Skip to content

security: fix RFC8785 fallback bypass, add timing-safe comparisons, k…#2

Open
NDR-US wants to merge 2 commits intomainfrom
claude/security-code-review-tWOkR
Open

security: fix RFC8785 fallback bypass, add timing-safe comparisons, k…#2
NDR-US wants to merge 2 commits intomainfrom
claude/security-code-review-tWOkR

Conversation

@NDR-US
Copy link
Owner

@NDR-US NDR-US commented Mar 12, 2026

…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

claude added 2 commits March 12, 2026 04:35
…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
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