Skip to content

fix(certificates)!: disclose undecoded unsigned attributes - #7920

Merged
morluto merged 2 commits into
mainfrom
codex/pe-7767-coverage-review
Oct 29, 2026
Merged

morluto merged 2 commits into
mainfrom
codex/pe-7767-coverage-review

Conversation

@morluto

@morluto morluto commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #7767. PE SignedData signer unsigned attributes could contain timestamp tokens or nested signatures while inspection reported complete coverage without mentioning them.

Problem and expected behavior

Callers need to distinguish the outer signer and certificates from undecoded nested contents. The parser now reports unsigned attribute OIDs, marks coverage partial when attributes are present, and explains the omitted contents. Absent attributes are reported as null. Older Evidence can omit the new field and remains readable. The similar APK v1 decoder also reports that only outer SignedData is decoded.

Change and scope

The PE ASN.1 producer owns attribute interpretation; the service rejects a provider report claiming complete coverage while reporting unsigned attributes. CLI and MCP share the resulting Evidence. This does not decode nested signatures or timestamp contents, verify signatures, or change target authority.

Contract and boundary impact

  • Semantic owner and earliest changed stage: PE SignedData parser; APK v1 report limitation.
  • Contribution scope fit and linked maintainer decision: existing read-only inspection; no new target execution or provider.
  • CLI and MCP/tool-catalog contract: signer gains nullable, optional unsigned_attribute_oids; coverage can be partial.
  • Provider, bridge, target-format, or platform compatibility: PE32 and PE32+; APK v1 limitation clarified.
  • Evidence, artifact, provenance, or reconstruction contract: retained older reports remain readable; new reports disclose omitted contents.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged.
  • Generated metadata, package, or installation impact: no authored generated files.

Expected effects:

  • Read existing files or captured data.

Evidence and regression coverage

  • Synthetic PE32 and PE32+ signedData cover timestamp and nested-signature OIDs, absent attributes, partial coverage, and the provider consistency boundary. Public CLI and MCP tests check output and the advertised JSON Schema.
  • Source audit: APK v1 skips unsigned attribute contents; Linux kernel-module inspection identifies and hashes a PKCS#7 range without claiming to decode its signer or certificates.
  • Remaining proof gaps: no real timestamped or dual-signed PE or APK was run; nested content remains undecoded. No signature or chain verification is claimed.

Validation performed

  • npm run test:local -- src/native/pe/PeCertificateParser.test.ts src/application/binaryDiagnostics/PeCertificatesService.test.ts — 44 passed.
  • npm run test:focused -- tests/acceptance/peCertificatesCli.test.ts tests/boundary/mcp/peCertificatesMcp.test.ts — 10 passed, including CLI/MCP and advertised schema.
  • npm run test:local -- src/apkSignature/ApkSignatureProvider.test.ts src/domain/apkSignature/apkV1SignatureBlock.test.ts — 44 passed.
  • npm run check:fast — passed; git diff --check HEAD — passed.

Compatibility, safety, and release

Coverage changes from complete to partial for observed unsigned attributes. Consumers should handle the new status and optional OID field. No real-provider, OS-specific, or cryptographic verification was performed.

Author readiness

Human owner: @morluto

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge; no new blocking issue was found.

Summary

PE certificate inspection now lists unsigned attribute OIDs and reports partial coverage when their contents remain undecoded. APK v1 guidance also clarifies that only outer SignedData is decoded.

  • PE reports name unsigned attributes and mark coverage partial.
  • APK v1 reports spell out that unsigned attributes are not decoded.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[PE SignedData] --> B[Read outer signers and unsigned attribute OIDs]
  B --> C{Unsigned attributes present?}
  C -->|Yes| D[Partial coverage and limitation]
  C -->|No| E[Complete outer coverage]
  D --> F[Service checks report consistency]
  E --> F
  F --> G[Shared Evidence for CLI and MCP]
Loading

Reviews (2) · Last reviewed commit: "test(certificates): use parser-owned lim..." · Reviewed by Greptile

@morluto
morluto marked this pull request as ready for review October 28, 2026 21:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T23:39:12.132456Z 051180c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 33d6975 into main Oct 29, 2026
42 checks passed
@morluto
morluto deleted the codex/pe-7767-coverage-review branch October 29, 2026 00:56
@morluto morluto added the bug Something isn't working label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] inspect_pe_certificates skips the signer's unsigned attributes (RFC 3161 timestamp token, nested signature) without saying so

1 participant