Skip to content

docs/Add cryptography and key management - #42

Open
felpzw wants to merge 2 commits into
cloudflare:mainfrom
felpzw:add-cryptography-and-key-management
Open

felpzw wants to merge 2 commits into
cloudflare:mainfrom
felpzw:add-cryptography-and-key-management

Conversation

@felpzw

@felpzw felpzw commented Sep 19, 2026

Copy link
Copy Markdown

Summary

Adds a dedicated cryptography and key-management audit companion and integrates it into the existing audit workflow. Reviewers can now select focused cryptographic attack classes, receive inline examples, and track coverage through the current ledger contract.

Closes issue #39.

Changes

  • Add CRYPTOGRAPHY-AND-KEY-MANAGEMENT.md covering:
    • Weak algorithms, insecure randomness, and nonce/IV reuse.
    • Authenticated encryption, key derivation, and purpose separation.
    • JWT algorithm and key selection.
    • Password hashing and migration.
    • TLS and certificate validation.
    • Secret storage, KMS/HSM boundaries, rotation, revocation, and disposal.
  • Include vulnerable and corrected examples alongside each class, with explicit assumptions and validation criteria.
  • Add companion selection guidance to SKILL.md and ATTACK-CLASSES.md.
  • Extend reconnaissance with cryptographic surface mapping and a coverage-unit example using exact Markdown block references.
  • Cross-reference the web and cloud companions while preserving their identity-flow and infrastructure responsibilities.
  • Update the README file inventory.

Validation approach

Findings require a demonstrated trust-boundary violation and a meaningful security consequence. Algorithm names, missing KMS/HSM integration, or configuration preferences alone do not establish a vulnerability. Decisive facts unavailable from source remain needs_validation.

Coverage integration uses the existing contract without changes to the findings schema or either validator.

Testing

  • All 65 existing validator tests pass.
  • Skill metadata validation passes.
  • git diff --check passes.
  • Verified 16 exact Markdown block references and local document links.
  • Verified that all 10 attack classes contain inline vulnerable and corrected examples.
  • Validated a synthetic nonce-reuse coverage unit through planned, in_progress, and candidate states using the existing validator CLI.

The synthetic fixture used dummy data and remained outside the repository. No live services or real secrets were used.

- Cover cryptographic primitives, randomness, nonces, JWT, password
  hashing, TLS validation, and the complete secret and key lifecycle.
- Keep vulnerable and corrected examples beside their attack classes,
  with explicit assumptions and source-grounded validation criteria.
- Distinguish demonstrated boundary violations from hardening advice
  and deployment facts that still need validation.
- List the new companion in the README file inventory.

Refs cloudflare#39
- Route cryptographic boundaries from SKILL.md and ATTACK-CLASSES.md.
- Map cryptographic surfaces during reconnaissance and document exact
  companion references in a coverage-unit example.
- Connect JWT and TLS review with the web companion, and key storage
  and rotation with the cloud companion.
- Preserve the existing findings schema and coverage validators.

Validation:
- All 65 existing validator tests pass.
- Skill metadata validation and git diff --check pass.
- Check 16 exact Markdown block references and local document links.
- Validate a synthetic nonce-reuse unit through planned, in_progress,
  and candidate states using the existing coverage-validator CLI.

Refs cloudflare#39
>
> **Cryptography and key-management targets** (security-sensitive encryption, MACs/signatures, random credentials, nonces/IVs, password verifiers, JWT cryptography, TLS validation, or key storage/rotation/revocation): use [CRYPTOGRAPHY-AND-KEY-MANAGEMENT.md](CRYPTOGRAPHY-AND-KEY-MANAGEMENT.md).
>
> **Client-side and browser targets** (SPAs, browser extensions, embedded webviews, service workers, browser storage, cross-window messaging, CORS, WebSockets, or DOM rendering): use [CLIENT-SIDE.md](CLIENT-SIDE.md).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client-side.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge i don't care wasted all my time with a angry wife chasing down to rouge agents in my local for fuck training excise

coffeegrind123 added a commit to coffeegrind123/security-audit-skill that referenced this pull request Nov 11, 2026
Upstream main has not moved since 2026-09-14, but 79 pull requests are
open. Each was read at the diff level, tested in its own worktree, and
checked for conflicts; the best of each duplicate group is ported.

Validators: cloudflare#143 archived verifier owner reuse, cloudflare#87 shared artifacts
within one attempt, cloudflare#102/cloudflare#103 duplicate JSON keys, cloudflare#111 1,000-field
objects, cloudflare#127 ordinary class must match assignment, cloudflare#104 self-excluded
ordinary block, cloudflare#141 verbatim quotes checked with --target, cloudflare#45 line
upper bound, cloudflare#84 --terminal rejects open units, cloudflare#145 identity-checked
open on Windows (POSIX still fails closed), cloudflare#48 retained-artifact
check (skills/ part only). Overlapping changes were merged so both
behaviours and both test sets survive.

Method: cloudflare#125 critic reasons through handoff, cloudflare#132 deployment controls
become units, cloudflare#83 carried-record gates, cloudflare#93 abort cleanup, cloudflare#23
streaming tool calls, cloudflare#50 config-dependent reachability stays
needs_validation, cloudflare#58 sequential verifier fallback, cloudflare#96 verifier no
longer sees the hunter's verdict, severity or fix.

Execution safety (cloudflare#76 neutralized git, symlink-safe copies; cloudflare#95
sanitized repo ID and prior-run compatibility; cloudflare#108 untrusted-content
prompt block; cloudflare#129 isolation built beside the host) moves into
EXECUTION-SAFETY.md so SKILL.md stays under its token budget.

Companions: cloudflare#101 cryptography, cloudflare#116 Android, cloudflare#35 edge isolate state.

Skipped: duplicates (cloudflare#82 cloudflare#106 cloudflare#91 cloudflare#70 cloudflare#138 cloudflare#131 cloudflare#75 cloudflare#63 cloudflare#97 cloudflare#123 cloudflare#25
cloudflare#26 cloudflare#16 cloudflare#40 cloudflare#42 cloudflare#142), validator-weakening fallbacks (cloudflare#59 cloudflare#113 cloudflare#99),
README/LICENSE churn, rebrands, scope creep, and cloudflare#85 cloudflare#90 cloudflare#8 cloudflare#89 cloudflare#32.

UPGRADE.md records this sync procedure.

Co-authored-by: Rohankollabathula67 <rohankollabathula67@gmail.com>
Co-authored-by: lab 1207 <hajarevaibhav527@gmail.com>
Co-authored-by: Rudy Celekli <rudy@gradiahq.com>
Co-authored-by: Mohit Rawat <rawatmohit17906@gmail.com>
Co-authored-by: MAHER AL-AQIL <18458259+maqalaqil@users.noreply.github.com>
Co-authored-by: CodeInf <jiuqiaoy@gmail.com>
Co-authored-by: pucedoteth <119044801+pucedoteth@users.noreply.github.com>
Co-authored-by: Matt Van Horn <mvanhorn@users.noreply.github.com>
Co-authored-by: Pizo <pizofreude@proton.me>
Co-authored-by: ZhiHe-ma <302089060+ZhiHe-ma@users.noreply.github.com>
Co-authored-by: shivam <juyaljii610@gmail.com>
Co-authored-by: Dante <duanjl.china@gmail.com>
Co-authored-by: Francisco <francisco@theysay.me>
Co-authored-by: Roman Dolgov <alter@users.noreply.github.com>
Co-authored-by: bodapatisaikrishna <saikrishnabodapati@gmail.com>
Co-authored-by: alvessh <117163985+alvessh@users.noreply.github.com>
Co-authored-by: itinance <hhuebel@itinance.com>
Co-authored-by: ChoYugyeong <cho4639@gmail.com>
Co-authored-by: Shaun Liebenberg <shaun@liebies.co.za>
Co-authored-by: JAI <jai19kharb@gmail.com>
Co-authored-by: ghostzeronz-coder <ghostzeronz-coder@users.noreply.github.com>
Co-authored-by: Aman Mohamed Ali <69119173+spidervirus@users.noreply.github.com>
Co-authored-by: Sandeep.dhami <sandeep84397@gmail.com>
Co-authored-by: jastfan <duohello640@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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