Commit Graph
3 Commits
Author SHA1 Message Date
BaaRai e448e5fe86 fix(skill): write the third-party blocklist in the executor home
The skill told the agent to append to /app/data/third-party-blocklist.txt, but under agent isolation the data directory is not writable by the executor uid. HOME points at the executor home in both modes and is writable there. Follow-up to #417.
2026-11-22 10:50:15 +01:00
Luis 264d6360cc fix(hardening): address review on the approval gate
- Priority 95-96 -> 70-72, below the built-in destructive denies (80/90/100),
  so 'pip install x && curl -X DELETE ...' still hits the DELETE deny instead of
  being downgraded to an approval (intercept.Match is priority-DESC).
- apply-intercept-rules.sh no longer sources .env as shell (code execution / $
  expansion). It reads POSTGRES_USER/DB from the postgres container's own env.
- Add a 'deny' rule for reading /app/keys, /proc/<pid>/environ and the DSN, so
  the key/DSN prohibition is enforced, not prose.
- Close named regex bypasses (pip3.12, git -c, bash -c "$(curl)", curl | tar);
  document the remaining open bypasses, the false positive, and the target-only
  limitation in the skill.
- Add hardening/rulecheck: compiles the patterns from the SQL (RE2) and asserts
  positives, closed bypasses, and documented open cases (18 cases, 0 failures).
2026-11-22 10:16:45 +01:00
Luis fff6157d39 feat(hardening): opt-in operator approval for acquiring third-party code
Add opt-in intercept rules (action ask, timeout -> deny) that pause the agent
before it downloads from code/exploit hosts, runs git clone, installs packages,
or pipes remote content into a shell, plus a third-party-code-review skill
(hash, blocklist-check, read and summarize the code before running it).

Nothing is seeded: the rules change no behavior until hardening/apply-intercept-rules.sh
is run, and code the agent writes itself is not gated -- only the point where
untrusted code enters. Regex patterns are RE2 (verified to compile); the apply
script is idempotent.
2026-11-22 10:16:45 +01:00