Preheat the oven to 350°F (175°C). Line a baking sheet with a parchment paper or silicone mat.
To make the dough: In a food processor, pulse the cranberries a few times until fine crumbs. And coarsely chop the pistachios.
In a mixing bowl with a paddle attachment, or using an electric hand- mixer, beat the butter and sugar until fluffy, 2 minutes.
Add eggs and vanilla extract and mix until well combined, another 2 or so minutes.
Stir in flour, baking soda and salt and mix just until well combined. The dough will be pretty sticky at this point, but don't worry, it's totally normal.
Add cranberries and pistachios.
To shape and bake the cookies: Sprinkle some flour on the prepared baking sheet. Transfer the dough onto the floured baking sheet using a silicone spatula. Form into about 11×3.5inch (28x9cm) log. Since the dough is quite sticky, flour your hands too.
Alternatively, you can divide the dough into 2 parts and form 2 narrower logs to make mini biscotti.
Bake for 30-35 minutes. Remove from oven and cool slightly.
Then while the biscotti log is still warm, cut it into 3/4-inch wide strips, using a serrated knife. Place them back on the baking sheet and bake for 10 minutes. For extra crunch, flip them and bake for another 10 minutes.
To decorate (optional): If desired, melt white chocolate in a double boiler or microwave until smooth, stirring frequently. Transfer the melted chocolate to the pastry bag with small round tip (I used Wilton #7), or zip-lock bag with small hole cut in the corner, and drizzle over the biscotti.