Add ProdGuard to Static Code Analysis 🤖🤖🤖 - #158
Open
Felix0731 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding ProdGuard to Static Code Analysis.
Repo: https://github.com/Felix0731/prodguard — MIT, zero runtime dependencies, Node >= 18.
npm: https://www.npmjs.com/package/prodguard
Why it's a fit for this list
Most tools in this section look for insecure code being added. ProdGuard looks for a security control being removed — the diff where RLS gets turned off to make a query work, a paywall gate gets pinned to
falsefor a demo, or email confirmation gets disabled to speed up testing. That failure mode has become common in agent-assisted codebases, and it doesn't trip a normal SAST rule because the resulting code isn't malformed, it's just unguarded.Eighteen rules, ten rated critical: RLS disabled or never enabled, service-role key reachable from client code or behind a
VITE_/NEXT_PUBLIC_prefix, Stripe webhook handler with noconstructEventsignature check, JWT decoded but never verified, Firebase rules open (including console test-mode), paywall/entitlement gate hardcoded, live secret or credential file committed,DELETE FROM/TRUNCATEwith noWHERE, CORS wildcard with credentials.Honest limits
It matches text, it does not parse your program, so an unusual spelling of the same bug can get past it — there's an allow-list for the reverse case. A clean run means these eighteen checks didn't fire, not that the app is secure.
Relevant to this list specifically: an audit before release found the tool printing the secrets it detected (redaction was wired into one rule of the twelve that existed then) and a ReDoS in one pattern that could hang CI for 159s. Both fixed in 0.5.0 with regression tests, redaction is now central in the rule runner so no rule can skip it. Flagging it here rather than leaving it for someone else to find.
Rules for over-broad
GRANTs and duplicate permissive RLS policies were added in 0.7.0 after users reported them.