Skip to content

[upstream staging] Deny unsafe_op_in_unsafe_fn in unsafe-bearing crates - #4

Closed
duksh wants to merge 1 commit into
mainfrom
claude/upstream-unsafe-op-lint
Closed

[upstream staging] Deny unsafe_op_in_unsafe_fn in unsafe-bearing crates#4
duksh wants to merge 1 commit into
mainfrom
claude/upstream-unsafe-op-lint

Conversation

@duksh

@duksh duksh commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

Staging PR for upstream submission to pyca/cryptography. Submit upstream via: pyca/cryptography@main...duksh:cryptography:claude/upstream-unsafe-op-lint

Adds unsafe_op_in_unsafe_fn to the existing #[deny(...)] in the four crates that contain unsafe code (cryptography-rust, cryptography-openssl, cryptography-cffi, cryptography-keepalive). Every unsafe operation inside an unsafe fn must now sit in an explicit unsafe block — which, combined with the already-denied clippy::undocumented_unsafe_blocks, means each one also carries a // SAFETY: comment. The codebase already complies; this prevents silent regressions.

Testing

  • cargo check --locked --workspace: clean, zero violations.
  • cargo fmt --all -- --check: clean.
  • cargo clippy --locked --all: zero warnings/errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c6de63f2-1f19-4f59-8b6a-803592cd2caa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/upstream-unsafe-op-lint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Requires every unsafe operation inside an unsafe fn to be wrapped in an
explicit unsafe block, complementing the existing
clippy::undocumented_unsafe_blocks deny so each such block also carries
a SAFETY comment. The codebase already complies; this prevents silent
regressions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
@duksh
duksh force-pushed the claude/upstream-unsafe-op-lint branch from 520233b to cdc95ba Compare July 24, 2026 04:09

duksh commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

Submitted upstream as pyca#15327 — closing this staging PR (validation complete: all 66 runnable jobs green, full local cargo check/clippy/fmt clean; ppc64le leg unrunnable on forks). Do not delete the branch until the upstream PR resolves.


Generated by Claude Code

@duksh duksh closed this Jul 25, 2026
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