827 Commits
Author SHA1 Message Date
Alexander Myasoedov a908eb1f9e Merge branch 'feat/sellbird-hardening' 2026-11-25 17:51:06 +02:00
Alexander Myasoedov 8c956e0cb4 Harden the LLM judge, redact secrets in logs, add contributor docs
- Fence the target model's output in a <target_output> block the output
  can't close, so a jailbroken reply can't steer the judge's verdict.
- Mask credentials (secret query params, Bearer tokens, x-api-key, sk-/
  sk-ant-/hf_/AKIA keys) in every log record; hold httpcore at WARNING.
- Add a localhost OpenAI/Anthropic stand-in (tests/fakes) and a
  fake_llm_api fixture; it records header names only.
- Replace any set *_API_KEY with a placeholder in tests unless marked live.
- Add CONTRIBUTING.md, CLAUDE.md, a PR template and a real SECURITY.md.
2026-11-25 17:51:06 +02:00
Alexander Myasoedov 5c24fac86d Merge pull request #395 from 2867297362mjb-sketch/feat/teamorouter-preset
feat: add TeamoRouter preset to LLM specs
2026-11-25 16:52:43 +02:00
Alexander Myasoedov a943603ffa Merge pull request #393 from bIackr0se/fix/pii-api-token-env-prefix
fix(pii): detect API tokens under prefixed environment names
2026-11-25 16:52:18 +02:00
2867297362mjb-sketchandClaude Opus 5.5 762f85118d feat: add TeamoRouter preset to LLM specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 02:29:03 -08:00
JR 890184e6f6 fix(pii): detect API tokens under prefixed environment names
The api_token pattern required a word boundary before api_key, access_token
and secret_key, and an underscore is a word character, so OPENAI_API_KEY=,
GITHUB_ACCESS_TOKEN= or AWS_SECRET_KEY= followed by a real token was never
recorded.

Add a second branch for those names when "_" joins them to a prefix. Main
never matched them, so the branch only adds findings, and it reports a
value only when a digit is directly followed by a letter in its first 64
characters, as in random tokens. It also skips placeholders such as
sk-your-key, calls or subscripts, and dotted references such as
md5sum.digest unless the value is a JWT. The existing branch for bare
names is unchanged.
2026-11-25 00:04:38 +01:00
Alexander Myasoedov de2ed5d1cf Merge pull request #392 from bIackr0se/fix/pii-api-token-forms
fix(pii): detect Bearer Authorization headers and quoted API key fields
2026-11-24 13:01:15 +02:00
JR e281f84e2c fix(pii): detect Bearer Authorization headers and quoted API key fields
The api_token pattern required ':' or '=' right after the keyword, so
'Authorization: Bearer <token>' (RFC 6750, section 2.1) and quoted keys
such as '"api_key": "..."' or an OAuth '"access_token"' field were
never flagged. Accept an optional closing quote after the keyword and
an Authorization header carrying a Bearer token, and skip placeholder
values such as YOUR_ACCESS_TOKEN, your_api_key_here and xxxxxx.
2026-11-23 20:31:43 +01:00
Alexander Myasoedov a11c932bf6 Merge pull request #390 from bIackr0se/fix/pii-private-key-headers
fix(pii): detect encrypted PKCS#8 and OpenPGP private key headers
2026-11-23 13:30:01 +02:00
Alexander Myasoedov 70fc9267d9 Merge pull request #391 from AyhamJo7/fix/anthropic-default-model
fix(anthropic): default to a Claude model Anthropic still serves
2026-11-23 13:29:39 +02:00
Ayham Joumran 8d2a55beb3 fix(anthropic): default to a Claude model Anthropic still serves
AnthropicProvider.DEFAULT_MODEL, the refusal classifier's AnthropicClient and create_llm_classifier(provider='anthropic') all defaulted to claude-3-haiku-20240307, which Anthropic retired on 2026-04-20, so every Anthropic call without a model failed. They now use claude-haiku-5-5, the current Haiku. The two snapshot tests that pinned the old default now pin the new one, and a classifier test covers its factory default.
2026-11-23 00:38:51 +01:00
JR 43e4aa9fa7 fix(pii): detect encrypted PKCS#8 and OpenPGP private key headers
The private_key pattern required PRIVATE KEY----- after an optional
prefix, so the ENCRYPTED PRIVATE KEY label (RFC 7468, section 11) and
the PGP PRIVATE KEY BLOCK armor header (RFC 4880, section 6.2) were
not reported. The PGP alternative could never match real OpenPGP armor.
2026-11-22 20:43:46 +01:00
Alexander Myasoedov dbbdf739e3 Merge pull request #388 from secretJod/fix/sandbox-dockerenv-pattern
fix(sandbox): match /.dockerenv checks in the sandbox escape detector
2026-11-19 20:30:53 +02:00
secretJod 464e12ac52 fix(sandbox): match /.dockerenv checks in the sandbox escape detector
The pattern was \b/\.dockerenv\b. A word boundary before '/' needs a word
character right before the slash, so '/.dockerenv' after a space, '=' or
the start of the text never matched; only paths like 'foo/.dockerenv' did.
2026-11-19 23:17:48 +05:30
Alexander Myasoedov b18ce3e496 Merge pull request #387 from whiteworthy/add-abliteratedllm
feat: add AbliteratedLLM preset to LLM specs
2026-11-19 18:51:54 +02:00
whiteworthy 570f54778f feat: add AbliteratedLLM preset to LLM specs 2026-11-19 12:45:48 -03:00
Alexander Myasoedov 37d9af1d19 docs: bold the multimodal, multi-step and fuzzing features in the README intro 2026-11-19 15:08:58 +02:00
Alexander Myasoedov 4fac47b90f docs: rewrite README around a no-key quick start and pinned CI scans 2026-11-19 15:07:40 +02:00
Alexander Myasoedov ca69c88138 feat(owasp): map probe datasets to the OWASP LLM Top 10 2026 2026-11-19 15:07:40 +02:00
Alexander Myasoedov 4bb7b67379 Merge pull request #386 from secretJod/fix/pii-credit-card-trailing-digits
fix(pii): detect credit cards followed by a CVV or expiry
2026-11-18 20:00:04 +02:00
secretJod 041b582116 fix(pii): detect credit cards followed by a CVV or expiry
The credit-card candidate regex greedily took up to 19 digits across
spaces and dashes, so a card number followed by more digits (a CVV, an
expiry month) was checked together with them and failed Luhn. Match the
whole run of digit groups and check each contiguous span of groups that
holds 13-19 digits.
2026-11-18 23:16:50 +05:30
Alexander Myasoedov 27fb7df086 Merge pull request #385 from Johnbjoseph-cybersec/jbj/owasp-llm-top-10-2025
fix(owasp): tag probes with the OWASP LLM Top 10 2025 ids
2026-11-16 12:05:13 +02:00
Alexander Myasoedov acf6374089 Merge pull request #384 from thibault-forks/add-requesty-provider
feat: add Requesty preset to LLM specs
2026-11-15 18:15:21 +02:00
Thibault Jaigu b45085d504 feat: add Requesty preset to LLM specs 2026-11-15 15:33:22 +00:00
Alexander Myasoedov 356f5d7c4c Merge pull request #383 from tausif-ahmed-guardian/gitty/agentic-security-readme-links
docs(readme): fix dead links to the CI/CD and module docs
2026-11-14 19:48:01 +02:00
Alexander Myasoedov b99aa07f0f Merge pull request #382 from anticipate218/fix/harness-blank-line-classification
Fix blank-line handling in harness outcomes
2026-11-14 19:47:12 +02:00
Tausif Ahmed a586a626f5 docs(readme): fix dead links to the CI/CD and module docs 2026-11-14 22:52:02 +05:30
anticipate218 179daedc60 Fix blank-line handling in harness outcomes 2026-11-15 00:06:38 +08:00
Alexander Myasoedov fe1f9cefa0 Merge pull request #380 from msoedov/dependabot/pip/soupsieve-4.0
chore(deps-dev): bump soupsieve from 3.0.3 to 4.0
2026-11-13 18:40:58 +02:00
dependabot[bot] f4dc28ea08 chore(deps-dev): bump soupsieve from 3.0.3 to 4.0
Bumps [soupsieve](https://github.com/facelessuser/soupsieve) from 3.0.3 to 4.0.
- [Release notes](https://github.com/facelessuser/soupsieve/releases)
- [Commits](https://github.com/facelessuser/soupsieve/compare/3.0.3...4.0)

---
updated-dependencies:
- dependency-name: soupsieve
  dependency-version: '4.0'
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-13 16:19:27 +00:00
John B Joseph 6495c671b2 fix(owasp): tag probes with the OWASP LLM Top 10 2025 ids
OWASP_LLM_TOP_10 used the 2023/24 v1.1 numbering while the badge links to the project, whose current list is the 2025 edition (https://genai.owasp.org/llm-top-10/). DataLeak now tags LLM02 Sensitive Information Disclosure, Malwaregen LLM05 Improper Output Handling, AgenticBackend LLM06 Excessive Agency, Hallucination and refuse-to-answer LLM09 Misinformation. The harness already uses LLM01:2025.
2026-11-13 07:41:51 +05:30
Alexander Myasoedov 5aee9da60f Merge pull request #379 from Aftabbs/fix/escape-json-control-chars
fix(http_spec): escape all JSON control characters in <<PROMPT>> substitution
2026-11-12 12:44:36 +02:00
Aftabbs 9a4fd1467a style(http_spec): restore LF line endings and fix escape in test literal 2026-11-12 07:16:35 +05:30
Aftabbs dac5570397 fix(http_spec): escape all JSON control characters in <<PROMPT>> substitution
escape_special_chars_for_json only escaped backslash, quote, \n, \r and \t.
Other control characters below U+0020 (backspace, form feed, ESC, NUL...)
were inserted raw into the JSON request body, producing invalid JSON that
targets reject, so attack prompts containing them were never evaluated.
Delegate to json.dumps, which escapes every character JSON requires.
2026-11-12 07:16:01 +05:30
Alexander Myasoedov 3ae108879e Merge pull request #374 from msoedov/dependabot/pip/pytest-9.2.0
chore(deps-dev): bump pytest from 9.1.1 to 9.2.0
2026-11-11 19:22:03 +02:00
dependabot[bot] bc8b3090ee chore(deps-dev): bump pytest from 9.1.1 to 9.2.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.1.1 to 9.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/9.1.1...9.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 9.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-11 17:13:44 +00:00
Alexander Myasoedov f7f756d75a Merge pull request #372 from msoedov/dependabot/pip/virtualenv-21.14.13
chore(deps-dev): bump virtualenv from 21.14.11 to 21.14.13
2026-11-11 18:39:26 +02:00
Alexander Myasoedov 52d269de3f Merge pull request #373 from Ankit1478/chore/unmark-ci-pins
Unmark the ci pins now that #369 has landed
2026-11-11 18:38:50 +02:00
Ankit1478 261feaa5bb Unmark the ci pins now that the exit-code fix has landed
#368 and #369 merged a minute apart. #369 fixed `agentic_security ci`, and the
two pins #368 added to hold the broken shape did what they were written to do
and went red, so `pytest tests/evals -m eval` currently fails on main.

Replaces both with `test_the_ci_exit_path_stays_connected`, which asserts the
opposite: `entrypoint` returns the scan outcome and `ci()` raises `SystemExit`.
Verified non-vacuous by reverting either half, which turns it red.

Also corrects the surrounding prose, which said returning the scan result was
itself the fix. Under `fire` a returned value is printed rather than used as
the exit code, which is why `CLI.scan` ends in `raise SystemExit`. The guard
checks for the raise, not just the return.
2026-11-11 21:17:45 +05:30
dependabot[bot] d7699b3b5d chore(deps-dev): bump virtualenv from 21.14.11 to 21.14.13
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 21.14.11 to 21.14.13.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/virtualenv/compare/21.14.11...21.14.13)

---
updated-dependencies:
- dependency-name: virtualenv
  dependency-version: 21.14.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-11 14:51:46 +00:00
Alexander Myasoedov 0ebac43fc6 Merge pull request #368 from Ankit1478/feat/scan-evaluation-suite
Add an opt-in scan evaluation suite
2026-11-11 16:19:51 +02:00
Alexander Myasoedov d522f8f8ad Merge pull request #369 from Ankit1478/fix/ci-exit-code
Make agentic_security ci fail a build when a module exceeds max_th
2026-11-11 16:18:06 +02:00
Alexander Myasoedov f31ee53bb4 Merge pull request #371 from PSA-Team-source/add-uberllm-provider
feat: add UberLLM preset to LLM specs
2026-11-11 13:13:19 +02:00
PSA-Team-source ad6001b10f feat: add UberLLM preset to LLM specs 2026-11-10 20:54:56 +07:00
Ankit1478 0def2ec061 Make agentic_security ci fail a build when a module exceeds max_th
`CLI.ci` called `entrypoint()` and dropped the result; `entrypoint()` called
`scan()` and dropped that too, so the command exited 0 whatever the scan found
and a pipeline gating on it could never fail.

`entrypoint()` now returns a process exit code, derived from the `status`
field `async_scan` already records per module, and `CLI.ci` raises
`SystemExit` with it. That mirrors `CLI.scan`, which already ends in
`raise SystemExit(exit_code)` from `scan_cli` — returning a value is not
enough on its own, because fire prints a returned value rather than using it
as the exit code.

Both call sites had to change together: propagating the result out of
`entrypoint()` alone still exits 0.

Fixes #367
2026-11-09 14:53:05 +05:30
Ankit1478 fdfd1f9851 Proofread the eval README 2026-11-09 13:37:00 +05:30
Ankit1478 0594e5d59e Fix stale references left in the eval suite docs
The _runner docstring still said nothing covered the failure-rate arithmetic
or the optimize=True early stop; test_scan_module.py covers both. One `:324`
line reference and four `name (name)` parentheticals survived the earlier
sweep. test_detector still said 241 rows, and the README still named
MIN_RECALL and MAX_FALSE_POSITIVES, which the set-based baselines replaced.

Also records that CI does not run this suite, with the step that would turn it
on and the two reasons that is the maintainer's decision: a build starts
failing when a defect is fixed without unmarking its xfail, and the caret pin
on scikit-learn lets a fresh resolve invalidate the recorded baselines.
2026-11-09 13:29:41 +05:30
Ankit1478 acd11c2a4c Keep local-only ignores out of the eval suite change 2026-11-09 13:12:51 +05:30
Ankit1478 8bb7981225 Fix stale figures in the eval README 2026-11-09 13:12:51 +05:30
Ankit1478 9b03064943 Correct the xfail count in the eval README 2026-11-09 13:12:51 +05:30