torusguard 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.torusguard/.manifest.json +66 -63
- package/.torusguard/rules/business-logic/TG-BIZ-001-client-controlled-sensitive-business-value.md +30 -14
- package/.torusguard/rules/business-logic/TG-BIZ-002-replayable-one-time-operation.md +33 -16
- package/.torusguard/rules/business-logic/TG-BIZ-003-missing-workflow-state-validation.md +31 -15
- package/.torusguard/rules/business-logic/TG-BIZ-004-unrestricted-sensitive-business-flow.md +26 -16
- package/.torusguard/rules/cache/TG-CACHE-001-sensitive-response-publicly-cacheable.md +24 -16
- package/.torusguard/rules/cache/TG-CACHE-002-missing-user-cache-isolation.md +32 -18
- package/.torusguard/rules/cache/TG-CACHE-003-sensitive-data-in-url.md +24 -17
- package/.torusguard/rules/csrf/TG-CSRF-001-missing-csrf-protection.md +31 -18
- package/.torusguard/rules/csrf/TG-CSRF-002-unsafe-credentialed-cross-origin-request.md +28 -17
- package/.torusguard/rules/graphql/TG-GQL-002-resolver-missing-authorization.md +33 -17
- package/.torusguard/rules/graphql/TG-GQL-003-unbounded-graphql-pagination-or-batching.md +31 -16
- package/.torusguard/rules/graphql/TG-GQL-004-unnecessary-production-introspection.md +25 -16
- package/.torusguard/rules/secrets/TG-SEC-005-secret-in-git-history.md +24 -19
- package/.torusguard/rules/secrets/TG-SEC-006-secret-in-build-artifact.md +36 -19
- package/.torusguard/rules/secrets/TG-SEC-007-secret-in-test-or-example-fixture.md +21 -16
- package/.torusguard/rules/ssrf/TG-SSRF-002-missing-internal-network-protection.md +45 -18
- package/.torusguard/rules/ssrf/TG-SSRF-003-unsafe-redirect-following.md +20 -16
- package/.torusguard/rules/ssrf/TG-SSRF-004-unbounded-outbound-request.md +28 -19
- package/.torusguard/rules/supply-chain/TG-SUPPLY-001-missing-or-ignored-dependency-lockfile.md +25 -18
- package/.torusguard/rules/supply-chain/TG-SUPPLY-003-unsafe-ci-cd-secret-exposure.md +29 -19
- package/.torusguard/rules/supply-chain/TG-SUPPLY-004-unpinned-ci-action.md +23 -18
- package/.torusguard/rules/supply-chain/TG-SUPPLY-005-unsafe-dependency-install-script.md +23 -18
- package/.torusguard/rules/webhook/TG-WEBHOOK-001-missing-webhook-signature-verification.md +36 -16
- package/.torusguard/rules/webhook/TG-WEBHOOK-002-replayable-webhook.md +26 -17
- package/.torusguard/rules/webhook/TG-WEBHOOK-003-missing-webhook-idempotency.md +30 -16
- package/.torusguard/rules/webhook/TG-WEBHOOK-004-unvalidated-webhook-event-type.md +25 -16
- package/.torusguard/rules/websocket/TG-WS-002-missing-channel-level-authorization.md +28 -17
- package/.torusguard/rules/websocket/TG-WS-003-unvalidated-websocket-message.md +31 -17
- package/.torusguard/rules/websocket/TG-WS-004-unbounded-websocket-connections.md +31 -17
- package/.torusguard/rules_catalog.json +520 -0
- package/.torusguard/runs/report-latest.html +2700 -232
- package/.torusguard/runs/results-latest.sarif +20 -0
- package/.torusguard/runs/run-20260912-214110-audit/findings.json +1256 -0
- package/.torusguard/runs/run-20260912-214110-audit/findings.md +534 -0
- package/.torusguard/runs/run-20260912-214110-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260912-214110-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260912-214813-audit/findings.json +992 -0
- package/.torusguard/runs/run-20260912-214813-audit/findings.md +422 -0
- package/.torusguard/runs/run-20260912-214813-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260912-214813-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-auth-003-49-7c96f3/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-auth-003-49-7c96f3/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-auth-003-49-7c96f3/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-input-003-53-d167b4/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-input-003-53-d167b4/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-input-003-53-d167b4/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-platform-001-12-cf8156/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-platform-001-12-cf8156/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-platform-001-12-cf8156/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-rate-001-26-affcfa/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-rate-001-26-affcfa/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-rate-001-26-affcfa/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-sec-001-9-e22e50/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-sec-001-9-e22e50/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-sec-001-9-e22e50/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-ssrf-004-9-9803ad/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-ssrf-004-9-9803ad/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-ssrf-004-9-9803ad/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215555-audit/findings.json +530 -0
- package/.torusguard/runs/run-20260912-215555-audit/findings.md +232 -0
- package/.torusguard/runs/run-20260912-215555-audit/manifest.json +13 -0
- package/.torusguard/runs/run-20260912-215555-audit/remediation.md +102 -0
- package/.torusguard/runs/run-20260912-215555-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260912-215731-audit/apply_plan.md +6 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-client-001-7-587129/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-client-001-7-587129/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-client-001-7-587129/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-db-002-9-5f7850/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-db-002-9-5f7850/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-db-002-9-5f7850/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-001-27-2486f1/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-001-27-2486f1/minimal_patch_plan.md +22 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-001-27-2486f1/patch.diff +10 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-003-53-d167b4/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-003-53-d167b4/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-003-53-d167b4/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-001-12-cf8156/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-001-12-cf8156/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-001-12-cf8156/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-17-876973/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-17-876973/minimal_patch_plan.md +23 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-17-876973/patch.diff +11 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-5-40c794/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-5-40c794/minimal_patch_plan.md +23 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-5-40c794/patch.diff +11 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-001-26-affcfa/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-001-26-affcfa/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-001-26-affcfa/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-002-54-0b38d2/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-002-54-0b38d2/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-002-54-0b38d2/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-18-a3c1e8/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-18-a3c1e8/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-18-a3c1e8/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-9-e22e50/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-9-e22e50/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-9-e22e50/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-28-a1a0a1/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-28-a1a0a1/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-28-a1a0a1/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-30-00569e/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-30-00569e/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-30-00569e/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-ssrf-004-9-9803ad/metadata.json +17 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-ssrf-004-9-9803ad/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-ssrf-004-9-9803ad/patch.diff +9 -0
- package/.torusguard/runs/run-20260912-215731-audit/diff_summary.md +186 -0
- package/.torusguard/runs/run-20260912-215731-audit/findings.json +497 -0
- package/.torusguard/runs/run-20260912-215731-audit/findings.md +218 -0
- package/.torusguard/runs/run-20260912-215731-audit/manifest.json +14 -0
- package/.torusguard/runs/run-20260912-215731-audit/recheck.md +76 -0
- package/.torusguard/runs/run-20260912-215731-audit/remediation.md +234 -0
- package/.torusguard/runs/run-20260912-215731-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260912-220134-audit/findings.json +68 -0
- package/.torusguard/runs/run-20260912-220134-audit/findings.md +36 -0
- package/.torusguard/runs/run-20260912-220134-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260912-220134-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260912-220200-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260912-220200-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260912-220200-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260912-220200-audit/recheck.md +6 -0
- package/.torusguard/runs/run-20260912-220200-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260912-220227-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260912-220227-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260912-220227-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260912-220227-audit/recheck.md +6 -0
- package/.torusguard/runs/run-20260912-220227-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-104221-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260918-104221-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260918-104221-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-104221-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-104236-audit/findings.json +2314 -0
- package/.torusguard/runs/run-20260918-104236-audit/findings.md +960 -0
- package/.torusguard/runs/run-20260918-104236-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-104236-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-105723-audit/findings.json +2382 -0
- package/.torusguard/runs/run-20260918-105723-audit/findings.md +960 -0
- package/.torusguard/runs/run-20260918-105723-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-105723-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-105731-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260918-105731-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260918-105731-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-105731-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-105940-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260918-105940-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260918-105940-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-105940-audit/summary.md +5 -0
- package/.torusguard/scripts/__pycache__/apply_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/audit_runner.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/diff_guard.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/finding_scorer.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/finding_scorer.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/harden_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/html_reporter.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/memory_engine.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/monorepo_detector.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/recheck_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/report_sync.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/report_sync.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/run_manager.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/sarif_exporter.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/stack_detect.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/term_ui.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/term_ui.cpython-314.pyc +0 -0
- package/.torusguard/scripts/apply_runner.py +389 -377
- package/.torusguard/scripts/audit_runner.py +1513 -653
- package/.torusguard/scripts/finding_scorer.py +14 -2
- package/.torusguard/scripts/harden_runner.py +628 -455
- package/.torusguard/scripts/html_reporter.py +2668 -648
- package/.torusguard/scripts/recheck_runner.py +248 -238
- package/.torusguard/scripts/recipes_runner.py +137 -137
- package/.torusguard/scripts/report_sync.py +719 -0
- package/.torusguard/scripts/sarif_exporter.py +156 -116
- package/.torusguard/scripts/stack_detect.py +44 -2
- package/.torusguard/scripts/term_ui.py +162 -162
- package/.torusguard/skills/torusguard/SKILL.md +75 -72
- package/.torusguard/skills/torusguard-apply/SKILL.md +84 -80
- package/.torusguard/skills/torusguard-audit/SKILL.md +87 -83
- package/.torusguard/skills/torusguard-authorize/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-exploit-check/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-full/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-harden/SKILL.md +98 -94
- package/.torusguard/skills/torusguard-init/SKILL.md +68 -64
- package/.torusguard/skills/torusguard-recheck/SKILL.md +81 -77
- package/.torusguard/skills/torusguard-report/SKILL.md +93 -72
- package/.torusguard/skills/torusguard-status/SKILL.md +62 -58
- package/.torusguard/skills/torusguard-verify/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-web-validate/SKILL.md +7 -2
- package/.torusguard/snapshots/run-20260912-215731-audit/demo/playground/vulnerable_nextjs/actions.ts.bak +24 -0
- package/.torusguard/snapshots/run-20260912-215731-audit/examples/hardened-react-express/server/index.js.bak +121 -0
- package/.torusguard/snapshots/run-20260912-215731-audit/examples/python/fastapi-vuln/main.py.bak +20 -0
- package/.torusguard/snapshots/run-20260912-215731-audit/examples/vulnerable-react-express/client/src/App.jsx.bak +63 -0
- package/.torusguard/snapshots/run-20260912-215731-audit/examples/vulnerable-react-express/client/vite.config.js.bak +12 -0
- package/.torusguard/snapshots/run-20260912-215731-audit/examples/vulnerable-react-express/server/index.js.bak +82 -0
- package/.torusguard/workflows/apply.md +11 -4
- package/.torusguard/workflows/audit.md +7 -1
- package/.torusguard/workflows/authorize.md +2 -1
- package/.torusguard/workflows/exploit-check.md +2 -1
- package/.torusguard/workflows/harden.md +7 -1
- package/.torusguard/workflows/init.md +6 -1
- package/.torusguard/workflows/memory.md +2 -1
- package/.torusguard/workflows/recheck.md +7 -1
- package/.torusguard/workflows/report.md +7 -1
- package/.torusguard/workflows/status.md +6 -1
- package/.torusguard/workflows/verify.md +6 -1
- package/.torusguard/workflows/web-validate.md +2 -1
- package/README.md +476 -345
- package/bin/torusguard.js +586 -545
- package/package.json +1 -1
- package/skills/torusguard/SKILL.md +73 -72
- package/skills/torusguard/bootstrap.py +7 -2
- package/skills/torusguard/payload/.manifest.json +66 -63
- package/skills/torusguard/payload/rules/business-logic/TG-BIZ-001-client-controlled-sensitive-business-value.md +30 -14
- package/skills/torusguard/payload/rules/business-logic/TG-BIZ-002-replayable-one-time-operation.md +33 -16
- package/skills/torusguard/payload/rules/business-logic/TG-BIZ-003-missing-workflow-state-validation.md +31 -15
- package/skills/torusguard/payload/rules/business-logic/TG-BIZ-004-unrestricted-sensitive-business-flow.md +26 -16
- package/skills/torusguard/payload/rules/cache/TG-CACHE-001-sensitive-response-publicly-cacheable.md +24 -16
- package/skills/torusguard/payload/rules/cache/TG-CACHE-002-missing-user-cache-isolation.md +32 -18
- package/skills/torusguard/payload/rules/cache/TG-CACHE-003-sensitive-data-in-url.md +24 -17
- package/skills/torusguard/payload/rules/csrf/TG-CSRF-001-missing-csrf-protection.md +31 -18
- package/skills/torusguard/payload/rules/csrf/TG-CSRF-002-unsafe-credentialed-cross-origin-request.md +28 -17
- package/skills/torusguard/payload/rules/graphql/TG-GQL-002-resolver-missing-authorization.md +33 -17
- package/skills/torusguard/payload/rules/graphql/TG-GQL-003-unbounded-graphql-pagination-or-batching.md +31 -16
- package/skills/torusguard/payload/rules/graphql/TG-GQL-004-unnecessary-production-introspection.md +25 -16
- package/skills/torusguard/payload/rules/secrets/TG-SEC-005-secret-in-git-history.md +24 -19
- package/skills/torusguard/payload/rules/secrets/TG-SEC-006-secret-in-build-artifact.md +36 -19
- package/skills/torusguard/payload/rules/secrets/TG-SEC-007-secret-in-test-or-example-fixture.md +21 -16
- package/skills/torusguard/payload/rules/ssrf/TG-SSRF-002-missing-internal-network-protection.md +45 -18
- package/skills/torusguard/payload/rules/ssrf/TG-SSRF-003-unsafe-redirect-following.md +20 -16
- package/skills/torusguard/payload/rules/ssrf/TG-SSRF-004-unbounded-outbound-request.md +28 -19
- package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-001-missing-or-ignored-dependency-lockfile.md +25 -18
- package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-003-unsafe-ci-cd-secret-exposure.md +29 -19
- package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-004-unpinned-ci-action.md +23 -18
- package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-005-unsafe-dependency-install-script.md +23 -18
- package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-001-missing-webhook-signature-verification.md +36 -16
- package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-002-replayable-webhook.md +26 -17
- package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-003-missing-webhook-idempotency.md +30 -16
- package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-004-unvalidated-webhook-event-type.md +25 -16
- package/skills/torusguard/payload/rules/websocket/TG-WS-002-missing-channel-level-authorization.md +28 -17
- package/skills/torusguard/payload/rules/websocket/TG-WS-003-unvalidated-websocket-message.md +31 -17
- package/skills/torusguard/payload/rules/websocket/TG-WS-004-unbounded-websocket-connections.md +31 -17
- package/skills/torusguard/payload/rules_catalog.json +520 -0
- package/skills/torusguard/payload/scripts/__pycache__/apply_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/audit_runner.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/diff_guard.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/diff_guard.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/finding_scorer.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/finding_scorer.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/harden_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/html_reporter.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/html_reporter.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/memory_engine.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/memory_engine.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/monorepo_detector.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/monorepo_detector.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/recheck_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/report_sync.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/report_sync.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/rules_sync.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/run_manager.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/run_manager.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/sarif_exporter.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/stack_detect.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/stack_detect.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/term_ui.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/term_ui.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/apply_runner.py +389 -377
- package/skills/torusguard/payload/scripts/audit_runner.py +1513 -653
- package/skills/torusguard/payload/scripts/finding_scorer.py +14 -2
- package/skills/torusguard/payload/scripts/harden_runner.py +628 -455
- package/skills/torusguard/payload/scripts/html_reporter.py +2668 -648
- package/skills/torusguard/payload/scripts/recheck_runner.py +248 -238
- package/skills/torusguard/payload/scripts/recipes_runner.py +137 -137
- package/skills/torusguard/payload/scripts/report_sync.py +719 -0
- package/skills/torusguard/payload/scripts/sarif_exporter.py +156 -116
- package/skills/torusguard/payload/scripts/stack_detect.py +44 -2
- package/skills/torusguard/payload/scripts/term_ui.py +162 -162
- package/skills/torusguard/payload/skills/torusguard/SKILL.md +75 -72
- package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +84 -80
- package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +87 -83
- package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +7 -2
- package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +7 -2
- package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +7 -2
- package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +98 -94
- package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +68 -64
- package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +81 -77
- package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +93 -72
- package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +62 -58
- package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +7 -2
- package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +7 -2
- package/skills/torusguard/payload/workflows/apply.md +11 -4
- package/skills/torusguard/payload/workflows/audit.md +7 -1
- package/skills/torusguard/payload/workflows/authorize.md +2 -1
- package/skills/torusguard/payload/workflows/exploit-check.md +2 -1
- package/skills/torusguard/payload/workflows/harden.md +7 -1
- package/skills/torusguard/payload/workflows/init.md +6 -1
- package/skills/torusguard/payload/workflows/memory.md +2 -1
- package/skills/torusguard/payload/workflows/recheck.md +7 -1
- package/skills/torusguard/payload/workflows/report.md +7 -1
- package/skills/torusguard/payload/workflows/status.md +6 -1
- package/skills/torusguard/payload/workflows/verify.md +6 -1
- package/skills/torusguard/payload/workflows/web-validate.md +2 -1
- package/skills/torusguard-apply/SKILL.md +84 -80
- package/skills/torusguard-audit/SKILL.md +87 -83
- package/skills/torusguard-authorize/SKILL.md +7 -2
- package/skills/torusguard-exploit-check/SKILL.md +7 -2
- package/skills/torusguard-full/SKILL.md +7 -2
- package/skills/torusguard-harden/SKILL.md +98 -94
- package/skills/torusguard-init/SKILL.md +68 -64
- package/skills/torusguard-recheck/SKILL.md +81 -77
- package/skills/torusguard-report/SKILL.md +93 -72
- package/skills/torusguard-status/SKILL.md +62 -58
- package/skills/torusguard-verify/SKILL.md +7 -2
- package/skills/torusguard-web-validate/SKILL.md +7 -2
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# TorusGuard Security Audit Findings: run-20260912-215731-audit
|
|
2
|
+
- Target Root: `C:\Users\Admin\Desktop\TorusGuard`
|
|
3
|
+
- Total Scored Findings: `15`
|
|
4
|
+
- Identified Clusters: `7`
|
|
5
|
+
- Generated At: `2026-09-12 21:57:31 IST`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
## Summary of Findings
|
|
9
|
+
|
|
10
|
+
### [Critical] TG-SEC-001 - Hardcoded Secret or API Key in Tracked Source
|
|
11
|
+
- **Finding ID:** `TG-SEC-001-bb5e4b77`
|
|
12
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:9`
|
|
13
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
14
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
15
|
+
- **Description:** Hardcoded JWT signing secret
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
// TG-SEC-001: Hardcoded JWT secret
|
|
19
|
+
const JWT_SECRET = 'FAKE_DEMO_JWT_SECRET_NOT_FOR_PRODUCTION';
|
|
20
|
+
|
|
21
|
+
// TG-PLATFORM-001: Wildcard CORS with credentials
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### [Critical] TG-SEC-001 - Hardcoded Secret or API Key in Tracked Source
|
|
25
|
+
- **Finding ID:** `TG-SEC-001-c393d596`
|
|
26
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:18`
|
|
27
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
28
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
29
|
+
- **Description:** Hardcoded credential or API secret string
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
const users = [
|
|
33
|
+
{ id: '1', email: 'alice@demo.local', password: 'password123', name: 'Alice' },
|
|
34
|
+
{ id: '2', email: 'bob@demo.local', password: 'secret456', name: 'Bob' },
|
|
35
|
+
];
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### [Critical] TG-DB-002 - Privileged Database Credential in Browser Context
|
|
39
|
+
- **Finding ID:** `TG-DB-002-d9bd69df`
|
|
40
|
+
- **Location:** `demo/playground/vulnerable_nextjs/actions.ts:9`
|
|
41
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
42
|
+
- **Cluster:** `cluster-client-leak`
|
|
43
|
+
- **Description:** Service role key or raw database connection string reference in frontend code
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
// Finding 1: TG-CLIENT-001 - Backend admin key exposed in client-accessible code
|
|
47
|
+
export const SUPABASE_SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.demo_secret_token_1234567890";
|
|
48
|
+
|
|
49
|
+
interface UserRecord {
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### [Critical] TG-SSRF-004 - Unbounded Outbound Request Without Timeout
|
|
53
|
+
- **Finding ID:** `TG-SSRF-004-d8472223`
|
|
54
|
+
- **Location:** `examples/python/fastapi-vuln/main.py:9`
|
|
55
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
56
|
+
- **Cluster:** `cluster-ssrf`
|
|
57
|
+
- **Description:** Python requests call without explicit timeout parameter
|
|
58
|
+
```
|
|
59
|
+
@app.get("/fetch")
|
|
60
|
+
def fetch_url(url: str):
|
|
61
|
+
response = requests.get(url)
|
|
62
|
+
return {"status": response.status_code, "content": response.text}
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### [High] TG-INPUT-003 - Unsafe Dynamic Code or HTML Execution
|
|
67
|
+
- **Finding ID:** `TG-INPUT-003-fea9421e`
|
|
68
|
+
- **Location:** `examples/vulnerable-react-express/client/src/App.jsx:53`
|
|
69
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
70
|
+
- **Cluster:** `cluster-injection`
|
|
71
|
+
- **Description:** React dangerouslySetInnerHTML rendering raw unescaped HTML
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
{/* TG-INPUT-003: Unsafe HTML rendering */}
|
|
75
|
+
<div dangerouslySetInnerHTML={{ __html: bio }} />
|
|
76
|
+
|
|
77
|
+
<button onClick={fetchUser}>Fetch user (IDOR demo)</button>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### [High] TG-PLATFORM-001 - Wildcard CORS With Credentials
|
|
81
|
+
- **Finding ID:** `TG-PLATFORM-001-7dd35cb4`
|
|
82
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:12`
|
|
83
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
84
|
+
- **Cluster:** `cluster-auth-bypass`
|
|
85
|
+
- **Description:** Wildcard CORS origin configured in Express middleware
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
// TG-PLATFORM-001: Wildcard CORS with credentials
|
|
89
|
+
app.use(cors({ origin: '*', credentials: true }));
|
|
90
|
+
|
|
91
|
+
// TG-PLATFORM-004: No explicit JSON body size limit
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### [High] TG-AUTH-003 - Missing Object-Level Authorization (IDOR)
|
|
95
|
+
- **Finding ID:** `TG-AUTH-003-6a05e509`
|
|
96
|
+
- **Location:** `examples/hardened-react-express/server/index.js:49`
|
|
97
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
98
|
+
- **Cluster:** `cluster-auth-bypass`
|
|
99
|
+
- **Description:** JWT verification missing explicit algorithms restriction parameter
|
|
100
|
+
```
|
|
101
|
+
if (!token) return res.status(401).json({ error: 'Unauthorized' });
|
|
102
|
+
try {
|
|
103
|
+
req.user = jwt.verify(token, process.env.JWT_SECRET);
|
|
104
|
+
next();
|
|
105
|
+
} catch {
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### [High] TG-INPUT-001 - Missing Server-Side Request Validation
|
|
109
|
+
- **Finding ID:** `TG-INPUT-001-c7457f38`
|
|
110
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:27`
|
|
111
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
112
|
+
- **Cluster:** `cluster-injection`
|
|
113
|
+
- **Description:** Destructuring unvalidated req.body without schema validation
|
|
114
|
+
```
|
|
115
|
+
// TG-AUTH-004: Insecure cookie (no httpOnly/Secure/SameSite)
|
|
116
|
+
app.post('/api/login', (req, res) => {
|
|
117
|
+
const { email, password } = req.body;
|
|
118
|
+
console.log('Login attempt:', { email, password }); // TG-SEC-004
|
|
119
|
+
const user = users.find((u) => u.email === email && u.password === password);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### [High] TG-RATE-001 - Unlimited Authentication Endpoint
|
|
123
|
+
- **Finding ID:** `TG-RATE-001-dcd0a3c7`
|
|
124
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:26`
|
|
125
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
126
|
+
- **Cluster:** `cluster-rate-limiting`
|
|
127
|
+
- **Description:** Authentication POST endpoint defined without rate-limiting middleware
|
|
128
|
+
```
|
|
129
|
+
// TG-SEC-004: Logs sensitive data
|
|
130
|
+
// TG-AUTH-004: Insecure cookie (no httpOnly/Secure/SameSite)
|
|
131
|
+
app.post('/api/login', (req, res) => {
|
|
132
|
+
const { email, password } = req.body;
|
|
133
|
+
console.log('Login attempt:', { email, password }); // TG-SEC-004
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### [Medium] TG-PLATFORM-002 - Missing Security Headers
|
|
137
|
+
- **Finding ID:** `TG-PLATFORM-002-1f383dcf`
|
|
138
|
+
- **Location:** `examples/hardened-react-express/server/index.js:17`
|
|
139
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
140
|
+
- **Cluster:** `cluster-platform`
|
|
141
|
+
- **Description:** Express application initialized without helmet security headers middleware
|
|
142
|
+
```
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const app = express();
|
|
146
|
+
const PORT = 3001;
|
|
147
|
+
const isProd = process.env.NODE_ENV === 'production';
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### [Medium] TG-SEC-004 - Sensitive Information in Logs
|
|
151
|
+
- **Finding ID:** `TG-SEC-004-dbbc17f7`
|
|
152
|
+
- **Location:** `examples/vulnerable-react-express/client/src/App.jsx:30`
|
|
153
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
154
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
155
|
+
- **Description:** Plaintext credential or token logged to output sink
|
|
156
|
+
```
|
|
157
|
+
const data = await res.json();
|
|
158
|
+
// TG-CLIENT-002: Sensitive console logging
|
|
159
|
+
console.log('Login token:', data.token, 'config:', clientConfig);
|
|
160
|
+
setMessage(JSON.stringify(data));
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### [Medium] TG-CLIENT-001 - Public Production Source Maps
|
|
165
|
+
- **Finding ID:** `TG-CLIENT-001-1ba4789e`
|
|
166
|
+
- **Location:** `examples/vulnerable-react-express/client/vite.config.js:7`
|
|
167
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
168
|
+
- **Cluster:** `cluster-client-leak`
|
|
169
|
+
- **Description:** Build config emitting unminified source maps in production output
|
|
170
|
+
```
|
|
171
|
+
export default defineConfig({
|
|
172
|
+
plugins: [react()],
|
|
173
|
+
build: { sourcemap: true },
|
|
174
|
+
server: {
|
|
175
|
+
port: 5173,
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### [Medium] TG-SEC-004 - Sensitive Information in Logs
|
|
179
|
+
- **Finding ID:** `TG-SEC-004-08753da5`
|
|
180
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:28`
|
|
181
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
182
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
183
|
+
- **Description:** Plaintext credential or token logged to output sink
|
|
184
|
+
```
|
|
185
|
+
app.post('/api/login', (req, res) => {
|
|
186
|
+
const { email, password } = req.body;
|
|
187
|
+
console.log('Login attempt:', { email, password }); // TG-SEC-004
|
|
188
|
+
const user = users.find((u) => u.email === email && u.password === password);
|
|
189
|
+
if (!user) return res.status(401).json({ error: 'User not found' }); // enumeration
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### [Medium] TG-RATE-002 - Unlimited Public Write Endpoint
|
|
193
|
+
- **Finding ID:** `TG-RATE-002-d67d7c98`
|
|
194
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:54`
|
|
195
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
196
|
+
- **Cluster:** `cluster-rate-limiting`
|
|
197
|
+
- **Description:** Public submission endpoint defined without rate-limiting or captcha defense
|
|
198
|
+
```
|
|
199
|
+
// TG-INPUT-001: No validation
|
|
200
|
+
// TG-RATE-002: Unlimited contact endpoint
|
|
201
|
+
app.post('/api/contact', (req, res) => {
|
|
202
|
+
res.json({ received: req.body });
|
|
203
|
+
});
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### [Medium] TG-PLATFORM-002 - Missing Security Headers
|
|
207
|
+
- **Finding ID:** `TG-PLATFORM-002-eef342ec`
|
|
208
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:5`
|
|
209
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
210
|
+
- **Cluster:** `cluster-platform`
|
|
211
|
+
- **Description:** Express application initialized without helmet security headers middleware
|
|
212
|
+
```
|
|
213
|
+
const jwt = require('jsonwebtoken');
|
|
214
|
+
|
|
215
|
+
const app = express();
|
|
216
|
+
const PORT = 3001;
|
|
217
|
+
|
|
218
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"run_id": "run-20260912-215731-audit",
|
|
3
|
+
"command": "audit",
|
|
4
|
+
"target_name": "TorusGuard",
|
|
5
|
+
"created_at": "2026-09-12 21:57:31 IST",
|
|
6
|
+
"created_at_iso": "2026-09-12T21:57:31.350864+05:30",
|
|
7
|
+
"status": "recheck_completed",
|
|
8
|
+
"torusguard_version": "1.3.0",
|
|
9
|
+
"findings_count": 15,
|
|
10
|
+
"confirmed_fixed_count": 12,
|
|
11
|
+
"regressed_count": 0,
|
|
12
|
+
"remediation_bundles_count": 14,
|
|
13
|
+
"remediated": 14
|
|
14
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# TorusGuard Differential Recheck Report
|
|
2
|
+
**Run ID:** `run-20260912-215731-audit`
|
|
3
|
+
**Timestamp:** `2026-09-12 22:00:17 IST`
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
## Recheck Transition Catalog
|
|
7
|
+
|
|
8
|
+
### [TG-CLIENT-001] Public Production Source Maps
|
|
9
|
+
- **File:** `examples/vulnerable-react-express/client/vite.config.js`
|
|
10
|
+
- **Outcome:** `Confirmed Fixed`
|
|
11
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
12
|
+
|
|
13
|
+
### [TG-DB-002] Privileged Database Credential in Browser Context
|
|
14
|
+
- **File:** `demo/playground/vulnerable_nextjs/actions.ts`
|
|
15
|
+
- **Outcome:** `Unresolved`
|
|
16
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
17
|
+
|
|
18
|
+
### [TG-INPUT-001] Missing Server-Side Request Validation
|
|
19
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
20
|
+
- **Outcome:** `Unresolved`
|
|
21
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
22
|
+
|
|
23
|
+
### [TG-INPUT-003] Unsafe Dynamic Code or HTML Execution
|
|
24
|
+
- **File:** `examples/vulnerable-react-express/client/src/App.jsx`
|
|
25
|
+
- **Outcome:** `Confirmed Fixed`
|
|
26
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
27
|
+
|
|
28
|
+
### [TG-PLATFORM-001] Wildcard CORS With Credentials
|
|
29
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
30
|
+
- **Outcome:** `Confirmed Fixed`
|
|
31
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
32
|
+
|
|
33
|
+
### [TG-PLATFORM-002] Missing Security Headers
|
|
34
|
+
- **File:** `examples/hardened-react-express/server/index.js`
|
|
35
|
+
- **Outcome:** `Confirmed Fixed`
|
|
36
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
37
|
+
|
|
38
|
+
### [TG-PLATFORM-002] Missing Security Headers
|
|
39
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
40
|
+
- **Outcome:** `Confirmed Fixed`
|
|
41
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
42
|
+
|
|
43
|
+
### [TG-RATE-001] Unlimited Authentication Endpoint
|
|
44
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
45
|
+
- **Outcome:** `Confirmed Fixed`
|
|
46
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
47
|
+
|
|
48
|
+
### [TG-RATE-002] Unlimited Public Write Endpoint
|
|
49
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
50
|
+
- **Outcome:** `Confirmed Fixed`
|
|
51
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
52
|
+
|
|
53
|
+
### [TG-SEC-001] Hardcoded Secret or API Key in Tracked Source
|
|
54
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
55
|
+
- **Outcome:** `Confirmed Fixed`
|
|
56
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
57
|
+
|
|
58
|
+
### [TG-SEC-001] Hardcoded Secret or API Key in Tracked Source
|
|
59
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
60
|
+
- **Outcome:** `Confirmed Fixed`
|
|
61
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
62
|
+
|
|
63
|
+
### [TG-SEC-004] Sensitive Information in Logs
|
|
64
|
+
- **File:** `examples/vulnerable-react-express/server/index.js`
|
|
65
|
+
- **Outcome:** `Confirmed Fixed`
|
|
66
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
67
|
+
|
|
68
|
+
### [TG-SEC-004] Sensitive Information in Logs
|
|
69
|
+
- **File:** `examples/vulnerable-react-express/client/src/App.jsx`
|
|
70
|
+
- **Outcome:** `Confirmed Fixed`
|
|
71
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
72
|
+
|
|
73
|
+
### [TG-SSRF-004] Unbounded Outbound Request Without Timeout
|
|
74
|
+
- **File:** `examples/python/fastapi-vuln/main.py`
|
|
75
|
+
- **Outcome:** `Confirmed Fixed`
|
|
76
|
+
- **Verification Timestamp:** 2026-09-12 22:00:17 IST
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# TorusGuard Governed Remediation Catalog
|
|
2
|
+
**Run ID:** `run-20260912-215731-audit`
|
|
3
|
+
**Generated:** `2026-09-12 22:00:07 IST`
|
|
4
|
+
**Candidate Bundles Formulated:** `14`
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
## Formulated Candidate Patches
|
|
8
|
+
|
|
9
|
+
### [TG-SEC-001] Hardcoded Secret or API Key in Tracked Source
|
|
10
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:9` | **Bundle ID:** `bnd-tg-sec-001-9-e22e50`
|
|
11
|
+
- **Strategy:** Migrated hardcoded JWT secret to environment variable process.env.JWT_SECRET
|
|
12
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
13
|
+
```diff
|
|
14
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
15
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
16
|
+
@@ -7,5 +7,5 @@
|
|
17
|
+
|
|
18
|
+
// TG-SEC-001: Hardcoded JWT secret
|
|
19
|
+
-const JWT_SECRET = 'FAKE_DEMO_JWT_SECRET_NOT_FOR_PRODUCTION';
|
|
20
|
+
+const JWT_SECRET = process.env.JWT_SECRET || "";
|
|
21
|
+
|
|
22
|
+
// TG-PLATFORM-001: Wildcard CORS with credentials
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### [TG-SEC-001] Hardcoded Secret or API Key in Tracked Source
|
|
26
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:18` | **Bundle ID:** `bnd-tg-sec-001-18-a3c1e8`
|
|
27
|
+
- **Strategy:** Replaced hardcoded password with environment variable process.env.DEMO_USER_PASSWORD
|
|
28
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
29
|
+
```diff
|
|
30
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
31
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
32
|
+
@@ -16,5 +16,5 @@
|
|
33
|
+
|
|
34
|
+
const users = [
|
|
35
|
+
- { id: '1', email: 'alice@demo.local', password: 'password123', name: 'Alice' },
|
|
36
|
+
+ { id: '1', email: 'alice@demo.local', password: process.env.DEMO_USER_PASSWORD || "REDACTED_PASSWORD", name: 'Alice' },
|
|
37
|
+
{ id: '2', email: 'bob@demo.local', password: 'secret456', name: 'Bob' },
|
|
38
|
+
];
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### [TG-DB-002] Privileged Database Credential in Browser Context
|
|
42
|
+
- **Target:** `demo/playground/vulnerable_nextjs/actions.ts:9` | **Bundle ID:** `bnd-tg-db-002-9-5f7850`
|
|
43
|
+
- **Strategy:** Replaced hardcoded privileged database credential with process.env.SUPABASE_SERVICE_ROLE_KEY
|
|
44
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
45
|
+
```diff
|
|
46
|
+
--- a/demo/playground/vulnerable_nextjs/actions.ts
|
|
47
|
+
+++ b/demo/playground/vulnerable_nextjs/actions.ts
|
|
48
|
+
@@ -7,5 +7,5 @@
|
|
49
|
+
|
|
50
|
+
// Finding 1: TG-CLIENT-001 - Backend admin key exposed in client-accessible code
|
|
51
|
+
-export const SUPABASE_SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.demo_secret_token_1234567890";
|
|
52
|
+
+export const SUPABASE_SERVICE_ROLE_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY || "";
|
|
53
|
+
|
|
54
|
+
interface UserRecord {
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### [TG-SSRF-004] Unbounded Outbound Request Without Timeout
|
|
58
|
+
- **Target:** `examples/python/fastapi-vuln/main.py:9` | **Bundle ID:** `bnd-tg-ssrf-004-9-9803ad`
|
|
59
|
+
- **Strategy:** Injected explicit 10-second request timeout to prevent resource exhaustion
|
|
60
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
61
|
+
```diff
|
|
62
|
+
--- a/examples/python/fastapi-vuln/main.py
|
|
63
|
+
+++ b/examples/python/fastapi-vuln/main.py
|
|
64
|
+
@@ -7,5 +7,5 @@
|
|
65
|
+
@app.get("/fetch")
|
|
66
|
+
def fetch_url(url: str):
|
|
67
|
+
- response = requests.get(url)
|
|
68
|
+
+ response = requests.get(url, timeout=10)
|
|
69
|
+
return {"status": response.status_code, "content": response.text}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### [TG-INPUT-003] Unsafe Dynamic Code or HTML Execution
|
|
73
|
+
- **Target:** `examples/vulnerable-react-express/client/src/App.jsx:53` | **Bundle ID:** `bnd-tg-input-003-53-d167b4`
|
|
74
|
+
- **Strategy:** Replaced raw dangerouslySetInnerHTML injection with safe React text interpolation
|
|
75
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
76
|
+
```diff
|
|
77
|
+
--- a/examples/vulnerable-react-express/client/src/App.jsx
|
|
78
|
+
+++ b/examples/vulnerable-react-express/client/src/App.jsx
|
|
79
|
+
@@ -51,5 +51,5 @@
|
|
80
|
+
|
|
81
|
+
{/* TG-INPUT-003: Unsafe HTML rendering */}
|
|
82
|
+
- <div dangerouslySetInnerHTML={{ __html: bio }} />
|
|
83
|
+
+ <div>{bio}</div>
|
|
84
|
+
|
|
85
|
+
<button onClick={fetchUser}>Fetch user (IDOR demo)</button>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### [TG-PLATFORM-001] Wildcard CORS With Credentials
|
|
89
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:12` | **Bundle ID:** `bnd-tg-platform-001-12-cf8156`
|
|
90
|
+
- **Strategy:** Constrained wildcard CORS origin to process.env.ALLOWED_ORIGIN with secure fallback
|
|
91
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
92
|
+
```diff
|
|
93
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
94
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
95
|
+
@@ -10,5 +10,5 @@
|
|
96
|
+
|
|
97
|
+
// TG-PLATFORM-001: Wildcard CORS with credentials
|
|
98
|
+
-app.use(cors({ origin: '*', credentials: true }));
|
|
99
|
+
+app.use(cors({ origin: process.env.ALLOWED_ORIGIN || 'http://localhost:5173', credentials: true }));
|
|
100
|
+
|
|
101
|
+
// TG-PLATFORM-004: No explicit JSON body size limit
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### [TG-INPUT-001] Missing Server-Side Request Validation
|
|
105
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:27` | **Bundle ID:** `bnd-tg-input-001-27-2486f1`
|
|
106
|
+
- **Strategy:** Added defensive request body payload validation before destructuring
|
|
107
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
108
|
+
```diff
|
|
109
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
110
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
111
|
+
@@ -25,5 +25,5 @@
|
|
112
|
+
// TG-AUTH-004: Insecure cookie (no httpOnly/Secure/SameSite)
|
|
113
|
+
app.post('/api/login', (req, res) => {
|
|
114
|
+
- const { email, password } = req.body;
|
|
115
|
+
+ if (!req.body || typeof req.body !== "object") return res.status(400).json({ error: "Invalid payload" });
|
|
116
|
+
const { email, password } = req.body;
|
|
117
|
+
console.log('Login attempt:', { email, password }); // TG-SEC-004
|
|
118
|
+
const user = users.find((u) => u.email === email && u.password === password);
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### [TG-RATE-001] Unlimited Authentication Endpoint
|
|
122
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:26` | **Bundle ID:** `bnd-tg-rate-001-26-affcfa`
|
|
123
|
+
- **Strategy:** Injected authLimiter rate-limiting middleware to protect authentication endpoint from brute force
|
|
124
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
125
|
+
```diff
|
|
126
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
127
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
128
|
+
@@ -24,5 +24,5 @@
|
|
129
|
+
// TG-SEC-004: Logs sensitive data
|
|
130
|
+
// TG-AUTH-004: Insecure cookie (no httpOnly/Secure/SameSite)
|
|
131
|
+
-app.post('/api/login', (req, res) => {
|
|
132
|
+
+app.post('/api/login', authLimiter, (req, res) => {
|
|
133
|
+
const { email, password } = req.body;
|
|
134
|
+
console.log('Login attempt:', { email, password }); // TG-SEC-004
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### [TG-PLATFORM-002] Missing Security Headers
|
|
138
|
+
- **Target:** `examples/hardened-react-express/server/index.js:17` | **Bundle ID:** `bnd-tg-platform-002-17-876973`
|
|
139
|
+
- **Strategy:** Injected helmet security headers middleware into Express application
|
|
140
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
141
|
+
```diff
|
|
142
|
+
--- a/examples/hardened-react-express/server/index.js
|
|
143
|
+
+++ b/examples/hardened-react-express/server/index.js
|
|
144
|
+
@@ -15,5 +15,5 @@
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
-const app = express();
|
|
148
|
+
+const helmet = require("helmet");
|
|
149
|
+
const app = express();
|
|
150
|
+
app.use(helmet());
|
|
151
|
+
const PORT = 3001;
|
|
152
|
+
const isProd = process.env.NODE_ENV === 'production';
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### [TG-SEC-004] Sensitive Information in Logs
|
|
156
|
+
- **Target:** `examples/vulnerable-react-express/client/src/App.jsx:30` | **Bundle ID:** `bnd-tg-sec-004-30-00569e`
|
|
157
|
+
- **Strategy:** Redacted console logging of sensitive token or credential
|
|
158
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
159
|
+
```diff
|
|
160
|
+
--- a/examples/vulnerable-react-express/client/src/App.jsx
|
|
161
|
+
+++ b/examples/vulnerable-react-express/client/src/App.jsx
|
|
162
|
+
@@ -28,5 +28,5 @@
|
|
163
|
+
const data = await res.json();
|
|
164
|
+
// TG-CLIENT-002: Sensitive console logging
|
|
165
|
+
- console.log('Login token:', data.token, 'config:', clientConfig);
|
|
166
|
+
+ // Security: Sensitive credential log removed per TG-SEC-004
|
|
167
|
+
setMessage(JSON.stringify(data));
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### [TG-CLIENT-001] Public Production Source Maps
|
|
172
|
+
- **Target:** `examples/vulnerable-react-express/client/vite.config.js:7` | **Bundle ID:** `bnd-tg-client-001-7-587129`
|
|
173
|
+
- **Strategy:** Disabled public production source map emission
|
|
174
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
175
|
+
```diff
|
|
176
|
+
--- a/examples/vulnerable-react-express/client/vite.config.js
|
|
177
|
+
+++ b/examples/vulnerable-react-express/client/vite.config.js
|
|
178
|
+
@@ -5,5 +5,5 @@
|
|
179
|
+
export default defineConfig({
|
|
180
|
+
plugins: [react()],
|
|
181
|
+
- build: { sourcemap: true },
|
|
182
|
+
+ build: { sourcemap: false },
|
|
183
|
+
server: {
|
|
184
|
+
port: 5173,
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### [TG-SEC-004] Sensitive Information in Logs
|
|
188
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:28` | **Bundle ID:** `bnd-tg-sec-004-28-a1a0a1`
|
|
189
|
+
- **Strategy:** Redacted console logging of sensitive token or credential
|
|
190
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
191
|
+
```diff
|
|
192
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
193
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
194
|
+
@@ -26,5 +26,5 @@
|
|
195
|
+
app.post('/api/login', (req, res) => {
|
|
196
|
+
const { email, password } = req.body;
|
|
197
|
+
- console.log('Login attempt:', { email, password }); // TG-SEC-004
|
|
198
|
+
+ // Security: Sensitive credential log removed per TG-SEC-004
|
|
199
|
+
const user = users.find((u) => u.email === email && u.password === password);
|
|
200
|
+
if (!user) return res.status(401).json({ error: 'User not found' }); // enumeration
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### [TG-RATE-002] Unlimited Public Write Endpoint
|
|
204
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:54` | **Bundle ID:** `bnd-tg-rate-002-54-0b38d2`
|
|
205
|
+
- **Strategy:** Injected writeLimiter rate-limiting middleware to public write endpoint
|
|
206
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
207
|
+
```diff
|
|
208
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
209
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
210
|
+
@@ -52,5 +52,5 @@
|
|
211
|
+
// TG-INPUT-001: No validation
|
|
212
|
+
// TG-RATE-002: Unlimited contact endpoint
|
|
213
|
+
-app.post('/api/contact', (req, res) => {
|
|
214
|
+
+app.post('/api/contact', writeLimiter, (req, res) => {
|
|
215
|
+
res.json({ received: req.body });
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### [TG-PLATFORM-002] Missing Security Headers
|
|
220
|
+
- **Target:** `examples/vulnerable-react-express/server/index.js:5` | **Bundle ID:** `bnd-tg-platform-002-5-40c794`
|
|
221
|
+
- **Strategy:** Injected helmet security headers middleware into Express application
|
|
222
|
+
- **Ponytail Churn:** `+1 / -1`
|
|
223
|
+
```diff
|
|
224
|
+
--- a/examples/vulnerable-react-express/server/index.js
|
|
225
|
+
+++ b/examples/vulnerable-react-express/server/index.js
|
|
226
|
+
@@ -3,5 +3,5 @@
|
|
227
|
+
const jwt = require('jsonwebtoken');
|
|
228
|
+
|
|
229
|
+
-const app = express();
|
|
230
|
+
+const helmet = require("helmet");
|
|
231
|
+
const app = express();
|
|
232
|
+
app.use(helmet());
|
|
233
|
+
const PORT = 3001;
|
|
234
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"finding_id": "TG-SEC-002-d6272a02",
|
|
4
|
+
"rule_id": "TG-SEC-002",
|
|
5
|
+
"title": "Public Client Environment Variable Secret Exposure",
|
|
6
|
+
"description": "Client-exposed environment variable containing secret naming pattern",
|
|
7
|
+
"severity": "Critical",
|
|
8
|
+
"category": "secrets",
|
|
9
|
+
"cluster": "cluster-credentials-exposure",
|
|
10
|
+
"file_path": "demo/playground/vulnerable_nextjs/actions.ts",
|
|
11
|
+
"line_number": 9,
|
|
12
|
+
"matched_text": "NEXT_PUBLIC_SUPABASE_ANON_KEY",
|
|
13
|
+
"snippet": "\n// Finding 1: TG-CLIENT-001 - Backend admin key SUPABASE_SERVICE_ROLE_KEY must not be exposed in client-accessible code\nexport const SUPABASE_ANON_KEY = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || \"\";\n\ninterface UserRecord {",
|
|
14
|
+
"is_test": false,
|
|
15
|
+
"target": {
|
|
16
|
+
"file_path": "demo/playground/vulnerable_nextjs/actions.ts",
|
|
17
|
+
"start_line": 9,
|
|
18
|
+
"end_line": 9
|
|
19
|
+
},
|
|
20
|
+
"confidence_score": 55,
|
|
21
|
+
"confidence_band": "Medium Confidence",
|
|
22
|
+
"confidence_factors": {
|
|
23
|
+
"evidence_quality": 35,
|
|
24
|
+
"reproduction_success": 0,
|
|
25
|
+
"independent_confirmations": 5,
|
|
26
|
+
"environmental_clarity": 15,
|
|
27
|
+
"manual_review_status": 0,
|
|
28
|
+
"memory_boost": 0,
|
|
29
|
+
"test_exemption": false,
|
|
30
|
+
"test_deduction": 0,
|
|
31
|
+
"total_score": 55,
|
|
32
|
+
"classification_band": "Medium Confidence"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"finding_id": "TG-INPUT-001-dbe9cc30",
|
|
37
|
+
"rule_id": "TG-INPUT-001",
|
|
38
|
+
"title": "Missing Server-Side Request Validation",
|
|
39
|
+
"description": "Destructuring unvalidated req.body without schema validation",
|
|
40
|
+
"severity": "High",
|
|
41
|
+
"category": "injection",
|
|
42
|
+
"cluster": "cluster-injection",
|
|
43
|
+
"file_path": "examples/vulnerable-react-express/server/index.js",
|
|
44
|
+
"line_number": 77,
|
|
45
|
+
"matched_text": "const { email } = req.body;",
|
|
46
|
+
"snippet": "// TG-AUTH-005: Unsafe password reset\napp.post('/api/reset', (req, res) => {\n const { email } = req.body;\n const user = users.find((u) => u.email === email);\n if (!user) return res.status(404).json({ error: 'Email not registered' }); // enumeration",
|
|
47
|
+
"is_test": false,
|
|
48
|
+
"target": {
|
|
49
|
+
"file_path": "examples/vulnerable-react-express/server/index.js",
|
|
50
|
+
"start_line": 77,
|
|
51
|
+
"end_line": 77
|
|
52
|
+
},
|
|
53
|
+
"confidence_score": 70,
|
|
54
|
+
"confidence_band": "High Confidence",
|
|
55
|
+
"confidence_factors": {
|
|
56
|
+
"evidence_quality": 35,
|
|
57
|
+
"reproduction_success": 0,
|
|
58
|
+
"independent_confirmations": 5,
|
|
59
|
+
"environmental_clarity": 15,
|
|
60
|
+
"manual_review_status": 0,
|
|
61
|
+
"memory_boost": 15,
|
|
62
|
+
"test_exemption": false,
|
|
63
|
+
"test_deduction": 0,
|
|
64
|
+
"total_score": 70,
|
|
65
|
+
"classification_band": "High Confidence"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# TorusGuard Security Audit Findings: run-20260912-220134-audit
|
|
2
|
+
- Target Root: `C:\Users\Admin\Desktop\TorusGuard`
|
|
3
|
+
- Total Scored Findings: `2`
|
|
4
|
+
- Identified Clusters: `2`
|
|
5
|
+
- Generated At: `2026-09-12 22:01:34 IST`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
## Summary of Findings
|
|
9
|
+
|
|
10
|
+
### [Critical] TG-SEC-002 - Public Client Environment Variable Secret Exposure
|
|
11
|
+
- **Finding ID:** `TG-SEC-002-d6272a02`
|
|
12
|
+
- **Location:** `demo/playground/vulnerable_nextjs/actions.ts:9`
|
|
13
|
+
- **Confidence Score:** `55/100` (Medium Confidence)
|
|
14
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
15
|
+
- **Description:** Client-exposed environment variable containing secret naming pattern
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
// Finding 1: TG-CLIENT-001 - Backend admin key SUPABASE_SERVICE_ROLE_KEY must not be exposed in client-accessible code
|
|
19
|
+
export const SUPABASE_ANON_KEY = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || "";
|
|
20
|
+
|
|
21
|
+
interface UserRecord {
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### [High] TG-INPUT-001 - Missing Server-Side Request Validation
|
|
25
|
+
- **Finding ID:** `TG-INPUT-001-dbe9cc30`
|
|
26
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:77`
|
|
27
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
28
|
+
- **Cluster:** `cluster-injection`
|
|
29
|
+
- **Description:** Destructuring unvalidated req.body without schema validation
|
|
30
|
+
```
|
|
31
|
+
// TG-AUTH-005: Unsafe password reset
|
|
32
|
+
app.post('/api/reset', (req, res) => {
|
|
33
|
+
const { email } = req.body;
|
|
34
|
+
const user = users.find((u) => u.email === email);
|
|
35
|
+
if (!user) return res.status(404).json({ error: 'Email not registered' }); // enumeration
|
|
36
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"run_id": "run-20260912-220134-audit",
|
|
3
|
+
"command": "audit",
|
|
4
|
+
"target_name": "TorusGuard",
|
|
5
|
+
"created_at": "2026-09-12 22:01:34 IST",
|
|
6
|
+
"created_at_iso": "2026-09-12T22:01:34.272429+05:30",
|
|
7
|
+
"status": "completed",
|
|
8
|
+
"torusguard_version": "1.3.0",
|
|
9
|
+
"findings_count": 2,
|
|
10
|
+
"confirmed_fixed_count": 0,
|
|
11
|
+
"regressed_count": 0
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|