PR-04: Fixture app + known answers (scanner) - #27
Merged
Conversation
tests/fixtures/vulnerable-app/ is the scanner's test corpus, demo, and screenshot source — a small intentionally-vulnerable multi-language GenAI app. All credentials are fake canonical values (sk-proj-FAKE..., xoxb-FAKE...). - Covers DSGAI02/04/06/11/12/13/14/15/17/20 with genuine violations, PASS signals, and the two confirmed v0.2 bugs (unquoted .env P02.1 false negative; webhook.py P12.1 false positive) as tracked known_bug entries. - Adversarial docs/NOTES.md is the PR-07 prompt-injection regression test. - tests/expected-findings.yaml pins all 25 findings to exact lines (compound logic resolved), with must_not_flag negatives and known_false_negatives (unquoted .env, xoxb- token, JS endpoint) mapped to the PR that fixes each. - tests/expected-findings.schema.json validates the sheet. - tests/regen_expected.py regenerates/verifies line-pins (Appendix C mitigation); --check confirms all 25 pins match the live scan. - .github/secret_scanning.yml ignores the fixture fakes. Acceptance: fixture files match the sheet's paths/lines exactly (regen --check green); sheet validates against its schema.
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.
Phase 1. The single highest-credibility artifact: the test corpus, demo, screenshot source, and contributor on-ramp. Depends on PR-03 (rules).
What's here
tests/fixtures/vulnerable-app/— a small, intentionally-vulnerable multi-language GenAI app (Python + a JS service). Every secret is a fake canonical value (sk-proj-FAKE...,xoxb-FAKE...).torch.load), DSGAI06 (http MCP + uvicorn 0.0.0.0), DSGAI11 (unscoped vector query), DSGAI12 (LLM-generated SQL), DSGAI14 (content capture), DSGAI15 (secret in system prompt), DSGAI02 (hardcoded key).good_config.py(Vault),rate_limited_api.py(authed + rate-limited)..envunquoted key (P02.1 false negative) andwebhook.py(P12.1 false positive), both tracked.docs/NOTES.md— the PR-07 prompt-injection regression test.tests/expected-findings.yaml— 25 findings pinned to exact lines with compound logic (subtract,requires_nearby) resolved to final status, plusmust_not_flagnegatives andknown_false_negatives(each mapped to the PR that fixes it).tests/expected-findings.schema.json— validates the sheet.tests/regen_expected.py— regenerates/verifies line-pins (Appendix C mitigation for brittle line numbers)..github/secret_scanning.yml— ignores the fixture fakes.Verification (all local)
regen_expected.py --check: all 25 sheet line-pins match the livergscan exactly (0 drift).expected-findings.schema.json.scanner-lint(yamllint + md-link-check) green under the exact CI config.Design notes
requires_nearbyworks both ways..envis force-added (root.gitignoreignores.env).Follow-ups
tests/fixtures/**..env/webhook.pyknown-bugs. PR-15: JS ecosystem globs.