Skip to content

fix: separate runtime protected paths from file allowlist#103

Merged
Mr-Lucky merged 1 commit into
mainfrom
fix/issue-81-runtime-file-allowlist
Jun 8, 2026
Merged

fix: separate runtime protected paths from file allowlist#103
Mr-Lucky merged 1 commit into
mainfrom
fix/issue-81-runtime-file-allowlist

Conversation

@Mr-Lucky
Copy link
Copy Markdown
Contributor

@Mr-Lucky Mr-Lucky commented Jun 8, 2026

Summary

Separate runtime protected path matching from the file allowlist so sensitive runtime file reads still require approval when expected. This also threads runtime protected paths through the evaluator/protection flow and adds regression coverage for absolute home-path protected files.

Type

  • Bug fix
  • New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • npm run build passes
  • npm test passes (377 tests)
  • Manually tested the change

Related Issues

Closes #81

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2026

AgentGuard PR Review

  1. medium — src/runtime/evaluator.ts / src/runtime/types.ts
    runtimeFilesystemAllowlist() now falls back to ['*'] whenever policy.filesystemAllowlist is unset, and EffectiveRuntimePolicy adds an optional filesystemAllowlist that is never populated in this diff. If any caller relies on the OSS action scanner’s filesystem checks for non-OpenClaw paths, this patch effectively disables path restrictions there and can turn unauthorized file access into “allow”.
    • What can go wrong: runtime evaluation may stop flagging disallowed filesystem access for agents that do not pass options.filesystemAllowlist, weakening security decisions.
    • Fix: default the scanner input to the existing security boundary (policy.protectedPaths or an explicitly derived safe allowlist) instead of ['*'], and only use workspace allowlists for callers that intentionally provide them.

@Mr-Lucky Mr-Lucky merged commit 32828c0 into main Jun 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runtime protection treats protectedPaths as a file allowlist

2 participants