I used to help manage a large CDS portfolio, and (along with the folks at RiskMetrics) we settled on an approach I reckon was pretty decent.
First, let me say that market-data only simulations are the wrong way to go. Credit risk is sticky at various levels and then jumps like mad, so any given company's history tends to contain a highly unrealistic representation of the risk.
Let's think in terms of Monte Carlo simulation. Sometimes you can solve these things analytically, but in practice analytic solutions quickly become brittle.
First off your simulation must include jumps to default. They, after all, are the reason CDS have any value at all!
For the benefit of readers who don't know the market that well, since the CDS Big Bang CDS are nearly always priced in terms of an upfront payment, and coupons then are paid at standard rates. However these upfront prices may be positive or negative and ultimately depend on default probabilities. Thus it is much easier to do the simulations if you convert CDS upfront to default probability curves, which then have the property of not dipping below zero.
For simulating the curve changes, you can start stealing ideas from the interest rates literature. For expected shortfall, it is usually good enough to just treat a few points on any individual curve as log normally distributed, with high positive correlations.
I like treating all the curves with a 1-factor model, actually, on a single principal factor consisting of either the HY or IG CDX curve. Links with the equity or interest rate market can then be captured with correlation just through the CDX curve, leaving the individual curves to have their CDX component plus entirely idiosyncratic terms (of jump-to-default and default probability variation).
If you like, you can add simulations for recovery rates, though in practice I found those tended to just integrate out, so I ended up removing recovery rate simulation.
Once you have your curve simulations worked out, it is easy enough to convert back to upfront prices as necessary for scenario pricing.