Skip to main content

2 posts tagged with "rust"

View All Tags

One panic shouldn't kill the scan: isolating rules with catch_unwind

· 5 min read
Founder, Dragon Fractal · ex-AWS engineer

Cloud Cost Analyzer runs 92 rules against your cloud account in a single scan. A rule is a real unit of work: it pulls a resource's config and metrics, evaluates them against a cost model, and maybe emits a finding. They're independent, and every one of them leans on libraries I don't control: cloud SDKs, response parsers, date and math crates.

Any of that can meet an input it didn't anticipate and panic: an unwrap() that couldn't fail until some resource shape I'd never seen, an index out of bounds deep in a dependency, an overflow on a field that's normally small. Usually nobody wrote bad code. A library just hit an edge case nobody dependency-audited for.

The question isn't whether a rule will panic. It's what happens to the other 91 when rule #57 does. A cost report that dies two-thirds of the way through because one rule met one weird EBS volume isn't much use to anyone.

Social cards in pure Rust: no headless Chrome

· 7 min read
Founder, Dragon Fractal · ex-AWS engineer

Cloud Cost Analyzer (CCA) lets you share a read-only scan as a link. Someone drops that link in Slack or on LinkedIn, and instead of a bare URL I wanted it to unfurl into a proper card: the brand mark, the monthly savings we found, the number of findings.

That was two separate problems. Figuring them out took me somewhere I didn't expect, because neither one wanted a headless browser, but both needed a card. One of them even ate an afternoon because the fonts wouldn't cooperate. Here's the whole thing.