security: fix RFC8785 fallback bypass, add timing-safe comparisons, k…#2
Open
security: fix RFC8785 fallback bypass, add timing-safe comparisons, k…#2
Conversation
…ey permissions, input validation - verify.py: remove silent RFC8785→JSON fallback; raise RuntimeError when the declared canonicalization scheme is unavailable, preventing hash mismatch bypass - verify.py: replace != with hmac.compare_digest for constant-time hash and fingerprint comparisons - keys.py: chmod 600 private key file immediately after write; inline public-key bytes in _load_or_create to eliminate circular method call - schema.py: move `import re` to module level (was re-imported on every validated field) - cli.py: add FileNotFoundError/JSONDecodeError handling in cmd_seal/cmd_verify; replace private _pub_path attribute access with new public_key_path property - store.py: validate artifact_id/created_at presence in append() before DB insert https://claude.ai/code/session_01PdqL1HcWbLY28BjRgPTrhs
…ct.toml - Remove artifact_demo.py and seal_artifact.py from root; both are fully superseded by the `ceyo seal` and `ceyo verify` CLI commands - Expand .gitignore to cover *.py[cod], all *.pem, *.db-shm/wal, dist/, build/, *.egg-info/, and tool caches (mypy, ruff, coverage) - pyproject.toml: pin cryptography>=41, add [project.urls] for homepage and repository, correct license field, add coverage config https://claude.ai/code/session_01PdqL1HcWbLY28BjRgPTrhs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ey permissions, input validation
import reto module level (was re-imported on every validated field)