The security check
The security check is set with one key, security-check, in the Checks table of docs/ai/config.md. Unlike the other checks it does not take block, warn or off; it takes a level.
| Value | Runs |
|---|---|
off |
nothing |
local (default) |
the dangerous-pattern scan |
deps |
the pattern scan plus the dependency lookup |
full |
both, plus the deep check on request and before a release |
Dangerous patterns (all levels but off)
Section titled “Dangerous patterns (all levels but off)”On git commit, the added lines are scanned for constructs such as eval/exec, shell=True, pickle.loads, yaml.load without a safe loader, v-html, innerHTML = and SQL built by string concatenation. The SQL checks need a statement structure (SELECT ... FROM, INSERT INTO, UPDATE ... SET, DELETE ... FROM), so the word “update” or “select” in prose or a URL does not hold a commit. A query builder’s tagged template literal, where every ${…} is a bound parameter (sql`select … where code = ${code}` in Kysely, Drizzle or postgres.js, Prisma.sql`…` , $queryRaw`…` , $executeRaw`…` ), is not reported, but a line with a raw helper (sql.raw, sql.unsafe, Prisma.raw, $queryRawUnsafe and similar), an untagged template literal or real + concatenation still is. With the sql rule set on, in PHP files (.php, .php3 to .php8, .pht, .phtml, .inc, .module) sql-php-concat (concatenation) and sql-php-interpolation (a variable inside the string, also ${name}) report the same, and sql-format reports SQL built with "..." % x or "...".format(...); a LIKE '%…%' operand or a date format such as strftime('%Y', d) is not read as the % operator. A fixed DELETE … FROM or INSERT INTO string counts as concatenation only when its line carries a quote and +. A plain raise, print, logger or warnings.warn line (Python) or echo, error_log, throw new or logger line (PHP) that holds only string literals and simple operands is not read as SQL built from values, even if its message contains select ... from. Only coding rule sets you have switched on in docs/project/coding_rules.md are scanned for. The scan loads these rule sets only for a commit, so a broken rules.py or a coding_rules.md in cp1252 no longer blocks every shell command with git in it; a commit still blocks with the crash message.
- A hit stops the commit once per file and pattern, with its location. Fix it, or commit again to let it through.
- A line carrying
act:allow-dangeris exempt. - A finding that the adoption baseline of
act-adoptbooked (adopt_baseline.py, which scans the existing code once and books the findings in the backlog) passes without the first hold, so the first commit of an adopted project is not held for patterns that were there before. Only the exact file and rule pair counts, and a booking does not expire: a new hit of that rule in that file also passes until its key is removed from.act-local/danger-scan-hints/baseline.json. Secrets keep holding. - Documentation (
.md,.txt,.rst) and everything under.act/are never scanned.
This is separate from secret-scan, a regular block/warn/off check that stops a commit whose staged diff holds a key, token, private key, .env file or high-entropy assignment. It also catches a credential in a URL query string, a single-quoted key ({'token': '...'}), a PHP array entry ('token' => '...'), a literal fallback after an environment lookup (os.environ.get("API_TOKEN", "..."), process.env.API_TOKEN || "...") and a credential pair inside a quoted value. A line carrying act:allow-secret is exempt. So is one shape in .act-lock.json at the project root: the override hash doctor --accept writes, a rule ID as key and exactly 64 lowercase hex digits as value, nothing else on the line (a rule ID such as R-safe-no-secret-cli next to a hex value no longer reads as a credential). A known token shape on that line is still caught.
A file that cannot carry a comment (JSON, for example a script entry whose name looks like a credential) is handled with a list instead: docs/ai/local/secret-accepted.md, one line - <path> <hash>: <reason> per accepted line. <path> is relative to the project root with /, <hash> a hash of the line. You do not compute it: the hold message prints the finished entry for each finding (path and hash, never the value), and you paste it in. The exception falls as soon as the line changes or the same line appears in another file, and the commit is held again. A missing, oversized or unreadable list accepts nothing, and an entry naming the list itself is ignored.
Dependency gaps (deps, full)
Section titled “Dependency gaps (deps, full)”A live lookup of known vulnerabilities in your dependencies. It uses osv-scanner if installed, otherwise npm audit, pnpm audit, composer audit or pip-audit for the matching ecosystem. Lock files and requirement files it reads include package-lock.json, pnpm-lock.yaml (pnpm 9 or newer), composer.lock, requirements.txt, go.mod and Cargo.lock.
- On commit: for exactly the lock files that commit touches. The scan runs in the background; if it has not finished, the commit is denied once with “dependency scan running”, and the retry reads the result, which is cached for the day. If a scan never finishes, the commit starts one fresh scan; if that one dies too, the commit is refused instead of passing as “not checked”. To drop only this scan, set
security-check: local. - A linked scan cache holds the commit: while
.act-localor its scan cache folder is a link or junction, no scan result can be recorded through it, so a commit that touches a lock file is held instead of let through unchecked. The message names the link; make it a real folder, or setsecurity-check: off. - After
git merge,git pullorgit cherry-pick: the lock files the command brought in are checked right after it. Nothing is held up; a finding lands in the inbox as one report, once per lock-file state and day. - At session start: once a day over every lock file in the project, except those in folders git ignores and in nested checkouts. The note is grouped per lock file and states the age of the scan; a result is dropped once a scanned lock file has changed or disappeared.
- What holds a commit: an unaccepted finding of severity high or critical, naming package, version, advisory id, severity and fixed version. A lower or unknown severity only notes.
pip-auditreports no severity, so its findings only note. - Accepting a finding: add a line
- <advisory-id>: <reason>todocs/ai/local/security-accepted.md, one per line;#comments and blank lines are ignored. The id is the one the scanning tool reports (npm audituses numbers,osv-scannerandpnpm audituse GHSA ids), so after a change of package manager the entries need new ids (act-depspoints this out). - Failures never block, except a scan that dies twice and an unreadable report with findings: a missing tool is noted once per machine with its install command; a network or tool failure is noted every time and the commit goes through, so a machine without network can still commit.
python .act/scripts/security_scan.py --depsthen prints “scan incomplete” instead of “no known vulnerability found”. A tool that exits with its findings code but leaves no readable report (forpip-audit, whose own fatal errors also exit 1, only a non-empty one) holds the commit, since nobody can tell what was found:security_scan.py --depsexits 1 with anUNREAD FINDINGSline, and the session-start note and the report after a merge show it too.
The deep check (full)
Section titled “The deep check (full)”python .act/scripts/security_deep.py [--since <ref> | --all] runs Semgrep with open rule sets over the files changed since the latest tag (or the whole tree with --all). It runs only on request and before a release (act-release), never on every commit, and with a level other than full it prints one line and does nothing unless you pass --force. The release skill adds a security pass by the reviewer role. Its verdict follows severity: BLOCK only for an error on a path ordinary work reaches, a missing part of the assignment, a security hole a model can produce without intent, or a weakened check whose reason the author does not name; a constructed edge case is filed as a backlog case instead.
Which level to choose
Section titled “Which level to choose”local costs nothing and needs no tool. Switch to deps when the project has lock files and you want known-vulnerability findings before they ship; full before releases. See the configuration reference for the exact row and Configuration for how checks work in general.