Skip to content

Seed sinks for web frameworks and ORMs#27

Merged
andrew merged 1 commit intomainfrom
seed-framework-orm-sinks
Apr 11, 2026
Merged

Seed sinks for web frameworks and ORMs#27
andrew merged 1 commit intomainfrom
seed-framework-orm-sinks

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Apr 11, 2026

218 sinks across 46 tool defs (28 web frameworks, 17 ORMs/query builders) covering the framework-specific dangerous methods on top of the language stdlib sinks from #24.

Web frameworks contribute their XSS bypasses (html_safe, mark_safe, dangerouslySetInnerHTML, v-html, {!! !!}, th:utext, {@html}), template injection points (render inline:, render_template_string, Blade::render), redirect helpers, and file send paths. ORMs contribute raw query escape hatches (find_by_sql, $queryRawUnsafe, text(), Sequel.lit, Arel.sql, db.Raw) and mass assignment surfaces.

Notes capture when only some forms are dangerous: order() because column names aren't parameterizable, $queryRaw safe as tagged template but not with concat, where() safe with hash but not with interpolated string. The fullstack metaframeworks (Next, Nuxt, Remix, SvelteKit) carry both client-side dangerouslySetInnerHTML and server-side redirect sinks. Mongoose gets nosql_injection for $where and operator injection through unfiltered query objects. Spring gets the SpEL parser sink that expression-injection attacks run through.

Sources: Brakeman check definitions, Bandit blacklists, gosec rules, Semgrep registry rulesets per framework.

brief sinks on the Rails fixture now shows 74 sinks across Ruby, Rails, and ActiveRecord.

Closes #16

218 sinks across 46 tool defs covering the framework-specific dangerous
methods on top of the language stdlib sinks. Web frameworks contribute
their XSS bypasses (html_safe, mark_safe, dangerouslySetInnerHTML,
v-html, {!! !!}, th:utext), template injection points (render inline:,
render_template_string), redirect helpers, and file send paths. ORMs
contribute their raw query escape hatches (find_by_sql, $queryRawUnsafe,
text(), Sequel.lit, db.Raw) and mass assignment surfaces.

Notes capture when only some forms are dangerous: order() because column
names aren't parameterizable, $queryRaw safe as tagged template but not
with concat, where() safe with hash but not with interpolated string.
The fullstack metaframeworks (Next, Nuxt, Remix) carry both their
client-side dangerouslySetInnerHTML and their server-side redirect
sinks. Mongoose gets nosql_injection for $where and operator injection
through unfiltered query objects. Spring gets the SpEL parser sink that
log4shell-style attacks run through.

Updated TestSinksRubyProject to index by tool+symbol since Ruby,
Rails, and ActiveRecord all have a Marshal.load now.

Closes #16
@andrew andrew merged commit 7c5c8b0 into main Apr 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Seed [security] sink data for languages, web frameworks, and ORMs

1 participant