Bring a large pot of salted water (about 1/4 cup kosher salt for 5-6 quarts water) boil.
Put the pistachios on a cutting board and chop into crumbs with a large knife. Pile the onion, scallion, garlic and parsley on top and chop everything together until fine.
Transfer parsley mixture to a bowl. Stir in olive oil, cheese, 1 teaspoon salt and black pepper to taste.
Put the pasta into the boiling water and cook until almost al dente. Toss in the green beans and cook a few more minutes. Just before draining, scoop out ¼ cup of the pasta water and stir into the pesto.
Toss the hot pasta and green beans with the pesto and serve. Sprinkle with additional cheese, if desired.
Inspired by a recipe in The Splendid Table's How to Eat Supper.