Skip to content

fix: chdir to repo root on startup (policy file resolution)#13

Merged
Shaivpidadi merged 2 commits into
mainfrom
feat/cipher-security-precheck-key-hashing
Apr 19, 2026
Merged

fix: chdir to repo root on startup (policy file resolution)#13
Shaivpidadi merged 2 commits into
mainfrom
feat/cipher-security-precheck-key-hashing

Conversation

@Shaivpidadi

Copy link
Copy Markdown
Member

start.py was running with an arbitrary CWD on Render, causing policy.tool_access.yaml to not be found. Fix: os.chdir to the script's own directory before uvicorn starts.

Shaivpidadi and others added 2 commits April 18, 2026 20:07
…ompare plaintext

- APIKey model: replace plaintext `key` column with `key_hash` + `key_prefix`
- auth.py: hash incoming key before DB lookup, eliminating plaintext comparison
- key_utils.py: generate_api_key(), hash_api_key(), constant_time_compare()
- KEY_HMAC_SECRET env var required at runtime

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Shaivpidadi
Shaivpidadi merged commit e0b961b into main Apr 19, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant