Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
76 KB
MD5: a8f0c48b8877193b54b0f72a1a376e29
SHA-1: e09cd93730044bed33ca7e45d5297c96e091b02a
SHA-256: 0d676c75f0980631b0febddc381ccc7e5eff4c31d45692e58db3052b6cbb99ab
Download zip
122.58 KB
MD5: 887b6f03b0faae2a6189bc03a511dfff
SHA-1: df8a2331171ae84ce415f804e5a1c09db0de85ac
SHA-256: c921df8f9e7a961b00802b32324ef7045d58e6e8b1e62ba146f39536841a43c7
Release notes
A large update to 1.0.0: 12 new checks (21 in total), JSON and SARIF output for CI and AI agents, baselines for accepted findings, and — after the first real-world runs — the information a reviewer needs to decide whether a finding is real. Full details are in CHANGELOG.md.
Upgrading from 1.0.0
- Files git ignores are no longer scanned by default. They never ship. The report says how many were left out;
--include-ignoredscans them. Scanning a directory that is itself ignored (a contrib module in a Composer site) still scans all of it. - A route with no requirements is reported as unreachable, not publicly reachable — Drupal denies it to everyone.
- The JSON output gained keys (
schema_version,skipped,psalm_fail_reason,suppressed_count; per findingfingerprint,suppressed,suppression_reason,trace,docs). Every 1.0.0 key and value is unchanged. - A crashed deep pass is reported as failed instead of as a clean run.
- The deep-pass engine is now installable:
composer require --dev drupal-security/scanner.
New
- 12 new checks: command injection, SSRF, open redirect, path traversal and file inclusion, Twig template injection, the unescaped
t()!placeholder, incomplete (drifted) escapers, superglobal access,extract(),phar://, weak randomness for secrets, and fail-open verifiers. - A triage guide for every check (
reference/<check_id>.md): how to tell a real finding from a false positive, how to fix it, and how to suppress it. Linked from the table,--explain, JSON and SARIF. - Deep findings show their data flow: the untrusted source is named in the message, and
--explain, JSON (trace) and SARIF (codeFlows) carry the full source-to-sink path. --format=sariffor GitHub code scanning and GitLab.- Baselines (
.security-scan-baseline.json) to accept a reviewed finding with a recorded reason, without hiding it. - Run controls:
--checks,--skip,--fail-on,--deep,--list-checks,--exclude,--include-ignored,--baseline,--show-suppressed. - Checks are plugins (
#[SecurityCheck]), so other modules can add or alter them.
Fixed
- Far fewer false positives, measured on real contrib modules: credential-named identifiers in
secrets,mt_rand()used for dummy data, the reservedroute_callbacksrouting key, and matches inside comments and strings. - A deep finding is no longer reported twice, and a tainted redirect is reported as an open redirect rather than SSRF.
- The scan never silently skips a file: unreadable, oversize and unstattable files are listed in the report.
- A failing run ends by saying why it exits non-zero.
Security
- Git runs on the code under review with
core.fsmonitoroverridden, so a hostile repository cannot make the scanner execute a command. - Output escapes text taken from scanned code, and the Psalm runner uses a private temp directory.