Skip to content

Conversation

@AerionDyseti
Copy link
Contributor

Summary

Fixes permission checks that were not properly enforcing deny settings, allowing operations to proceed when they should be blocked.

Root Cause

Permission checks across the codebase were using an insecure pattern:

  • Only checking for "ask" or specific values
  • Ignoring "deny" settings
  • Allowing operations when permission was undefined, null, or any unexpected value
  • System was fail-open instead of fail-secure

Testing

Added comprehensive unit tests covering:

  • external_directory='allow' - proceeds without asking
  • external_directory='deny' - denies without asking
  • external_directory='ask' with approval - asks and proceeds
  • external_directory='ask' with denial - asks and denies

All 196 tests passing.

Fixes a systemic issue that could allow agents to bypass configured permission restrictions.

@rekram1-node
Copy link
Collaborator

Thank u for spotting this, will tweak it and merge it, currently cant due to github outage

@rekram1-node rekram1-node force-pushed the fix/critical-permission-security branch from 8b61430 to f0fa213 Compare November 18, 2025 22:31
@rekram1-node rekram1-node changed the title fix: permission checks not enforcing deny settings fix: permission checks for external_directory and doom_loop Nov 18, 2025
@rekram1-node rekram1-node merged commit 47bfae5 into anomalyco:dev Nov 18, 2025
3 checks passed
@AerionDyseti
Copy link
Contributor Author

Just to confirm: this current code path is "fail open" which means that if they leave it empty or put any value other than "ask" or "deny", it will automatically approve. I just want to make sure that's intended.

@rekram1-node
Copy link
Collaborator

If you don't set it, it automatically asks as intended

If you set it to allow it will allow

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.

2 participants