Add the sausagemeat, walnuts and ginger to a large bowl, sprinkle over the pepper and a little salt, then mix together with a wooden spoon or your hands.
Roll the pastry out thinly on a lightly floured surface and trim to a 30 cm (12 inch) square. Cut the square into 3 strips, 10 cm (4 inches) wide, then brush lightly with beaten egg. Spread 1 teaspoon of harissa in a band down the centre of each pastry strip, then top each strip with one-third of the sausagemeat mixture, spooning into a narrow band.
Fold the pastry over the filling and press the edges together well with the flattened tip of a small sharp knife. Trim the edge to neaten if needed, then slash the top of the strips.
Brush the sausage rolls with beaten egg, then cut each strip into 10 pieces and arrange slightly spaced apart on 2 lightly oiled baking sheets. Cook in a preheated oven, 200°C (400°F), Gas Mark 6, for about 20 minutes until golden and the pastry is well risen. Transfer to a wire rack then leave to cool for 20 minutes. Serve warm or cold.