Toast walnuts in a dry skillet over medium heat for 3 to 5 minutes until fragrant and slightly browned, then allow to cool completely.
Place the toasted walnuts, garlic, and salt in a food processor and pulse until finely ground.
Add the fresh basil leaves and pulse several times until the leaves are coarsely chopped and incorporated.
With the food processor running on low speed, slowly stream in the extra virgin olive oil until the mixture is fully emulsified and smooth.
Transfer the pesto to a small mixing bowl and stir in the grated Parmesan and Pecorino Romano cheeses by hand.
Season with black pepper and adjust salt to taste before serving or storing with a thin layer of olive oil on top to prevent oxidation.