Skip to content

fix(policy_compiler): replace String.to_existing_atom with allowlist safe_verb_atom - #83

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/policy-compiler-atom-exhaustion
Aug 11, 2026
Merged

fix(policy_compiler): replace String.to_existing_atom with allowlist safe_verb_atom#83
hyperpolymath merged 1 commit into
mainfrom
fix/policy-compiler-atom-exhaustion

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Resolves audit #31 Priority 5: prevents DoS via atom table exhaustion or ArgumentError when policy files contain unknown HTTP verbs.

The safe_verb_atom/1 function uses an explicit allowlist map instead of String.to_existing_atom/1, which is unsafe on user-controlled input (policy file contents are user-authored at policy authoring time).

This closes the gap identified in the 2026-06-02 self-audit where policy_compiler.ex still called String.to_existing_atom on verb strings from the policy DSL at lines 331 and 384.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe vibe@mistral.ai

…safe_verb_atom

Resolves audit #31 Priority 5: prevents DoS via atom table exhaustion or
ArgumentError when policy files contain unknown HTTP verbs.

The safe_verb_atom/1 function uses an explicit allowlist map instead of
String.to_existing_atom/1, which is unsafe on user-controlled input (policy
file contents are user-authored at policy authoring time).

This closes the gap identified in the 2026-06-02 self-audit where
policy_compiler.ex still called String.to_existing_atom on verb strings
from the policy DSL at lines 331 and 384.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@hyperpolymath
hyperpolymath merged commit 514cdd4 into main Aug 11, 2026
22 of 23 checks passed
@hyperpolymath
hyperpolymath deleted the fix/policy-compiler-atom-exhaustion branch August 11, 2026 23:35
@gitar-bot

gitar-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

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.

1 participant