Skip to content

Add 66 detection-only tool defs for security-relevant libraries#28

Merged
andrew merged 1 commit intomainfrom
add-security-lib-defs
Apr 11, 2026
Merged

Add 66 detection-only tool defs for security-relevant libraries#28
andrew merged 1 commit intomainfrom
add-security-lib-defs

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Apr 11, 2026

Detection-only defs for libraries that have no config files or commands but matter for threat-model: HTTP clients (requests, axios, faraday, guzzle, okhttp, reqwest), template engines (jinja2, ejs, pug, handlebars, thymeleaf, twig, haml, slim), serializers (pyyaml, jackson, snakeyaml, xstream, newtonsoft-json), XML parsers (lxml, nokogiri, ox, xml2js), JWT/auth (pyjwt, jsonwebtoken, passport, devise, omniauth, golang-jwt), process wrappers (execa, shelljs, invoke), file upload (multer, formidable, carrierwave, shrine), crypto (cryptography, pycryptodome, crypto-js, bcrypt).

Each detected via the dependencies primitive. category=build since taxonomy carries the real classification. 148 sinks with notes on conditional danger: jwt.decode without algorithms=, ECB mode, the 72-byte bcrypt truncation, Jackson's enableDefaultTyping. defusedxml has no sinks since it's the safe alternative — detecting it is a positive signal.

Added requests and jinja2 to the python fixture and a test asserting they fire ssrf, xss, ssti via their function:http-client and function:templating tags. KB goes from 446 to 512 defs.

Closes #17

HTTP clients (requests, axios, faraday, guzzle, okhttp, reqwest, etc),
template engines (jinja2, ejs, pug, handlebars, thymeleaf, twig, haml,
slim), serializers (pyyaml, jackson, snakeyaml, xstream,
newtonsoft-json), XML parsers (lxml, nokogiri, ox, xml2js), JWT/auth
libraries (pyjwt, jsonwebtoken, passport, devise, omniauth, golang-jwt),
process wrappers (execa, shelljs, invoke), file upload (multer,
formidable, carrierwave, shrine), and crypto (cryptography,
pycryptodome, crypto-js, bcrypt).

Each is detected purely via the dependencies primitive since they have
no config files or commands. category=build for now since taxonomy
carries the real classification (function:http-client,
function:templating, etc). 148 sinks total with notes on the
conditional cases: jwt.decode without algorithms restriction, $queryRaw
as tagged template vs concat, ECB mode, the 72-byte bcrypt truncation.

defusedxml has no sinks since it's the safe alternative. Detecting it is
a positive signal.

Added requests and jinja2 to the python fixture for end-to-end testing
and a TestThreatModelPythonLibs asserting they fire ssrf, xss, ssti via
their function tags. KB goes from 446 to 512 tool defs.

Closes #17
@andrew andrew merged commit cd23b96 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.

Add detection-only tool defs for security-relevant libraries

1 participant