Repository navigation
scanner/plugins/opensslconf: record Groups (TLS 1.3 key-exchange groups) - #237
SemyonAndreyev wants to merge 1 commit into
Conversation
|
Hi @san-zrl, GitHub closed #236 automatically after a branch rewrite on our side, so this PR replaces it. Thanks for the careful review — here is what changed:
|
There was a problem hiding this comment.
Hi @SemyonAndreyev - Thanks a lot for the renewed PR. This is better than #236 but still has two small issues. Please correct problems 1 and 2. Tx.
PR #237 evaluation
Verdict: request changes. The code and tests are correct. Two items remain: the stacked branch history, and one inaccurate sentence in the description.
What the description gets right
go build,go vetandgo testoss.pass onpr-237.- The "legacy alias" wording is in the code comment, the test doc, and the commit message.
- The plugin explanation mentions the section-priority rule.
- Only one
Assisted-bytrailer remains, plusSigned-off-by. The co-author trailer and session link are gone. - The Groups/Curves limitations and the follow-ups are stated clearly.
Problems
-
Inaccurate test description (must fix). Point 4 says the test has
Curvesinsystem_default_sectwinning overGroupsin a "non-preferred section". In the test,Groupsis in[req], andreqis in the preferred list (opensslconf.goline 340:system_default_sect, default, openssl_init, req, ca_default). The test still checks section priority between two preferred sections, so it is valid, but the description and the test comment at line 107 should say "later preferred section" instead. -
Stacked commits are not mentioned (blocker). The description says the content is "unchanged in substance" from #236, but
main..pr-237still has 6 commits. The diff against main touches 13 files (+225/−282), includinggo.mod/go.sumbumps, Go 1.26.8, removal of.idea/and.junie/, and a newAGENTS.md. None of these are related to Groups. Rebase ontomainor cherry-pick8364561onto a fresh branch, so the PR diff contains only the opensslconf change andopenssl.cnf. -
Non-blocking: case-insensitive scope. This is handled as a follow-up, as the description says. The other directives (
MinProtocol,CipherString,Options, …) remain case-sensitive. That is acceptable for this PR.
Status of the earlier pr-236 findings
- Addressed: comment describes current behavior, "legacy alias" wording, section-priority test, plugin explanation, AI trailers removed.
- Not addressed in code, by design: other directives' case sensitivity, and Groups not modelled as crypto-asset components (both explicitly deferred).
- Not addressed: the stacked branch (point 2 above).
Next steps
Once the branch is rebased to a single commit and the test wording in the description is corrected, approve. Mapping Groups to algorithm components can be tracked as a follow-up for #212.
MinProtocol/MaxProtocol/CipherString/Options/CAfile/CApath/default_md were already extracted from openssl.cnf into CBOM properties, but Groups was not -- so a post-quantum or hybrid key exchange configured via this directive (e.g. X25519MLKEM768) never reached the CBOM. "Curves" is the legacy alias for the same directive, and OpenSSL matches directive names case-insensitively, so both spellings are matched case-insensitively here (Groups preferred when a config sets both in the same section). Section priority still takes precedence over name priority: a match in an earlier preferred section wins even when a later section has the otherwise-preferred name. Groups/Curves are recorded as a plain string property; they are not yet modelled as cryptographic-asset components or linked to the TLS protocol component, and case-insensitive matching covers only these two names. Both are left as follow-ups. Part of cbomkit-theia#212. Signed-off-by: Semyon Andreev <q2quantum.app@gmail.com> Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
8364561 to
dd9a525
Compare
|
Hi @san-zrl — sorry for the four-working-day delay. Both requested blockers are now addressed.
The clean commit has the same stable patch-id as the previously tested commit Could you please approve that run and re-review when convenient? Thank you. |
Part of #212.
Problem
extractRelevantProperties()already extractsMinProtocol,MaxProtocol,CipherString,Options,CAfile,CApath,default_mdfrom an OpenSSLconfig file (
openssl.cnf) into CBOM component properties -- but notGroups.Groupsis the directive that carries the negotiated key-exchange groups forTLS 1.3, including post-quantum and hybrid groups (e.g.
X25519MLKEM768,X25519Kyber768Draft00). A config that pins PQC/hybrid key exchange via thisdirective currently produces a CBOM with no trace of that choice -- exactly
the kind of crypto-asset visibility this scanner exists to provide.
Fix
getFirstKeyCI()/lookupKeyCI()helpers for case-insensitivedirective lookup (OpenSSL itself matches config directive names
case-insensitively).
Groupsis extracted the same way the existing directives are, from the"Groups" directive or its legacy alias "Curves", both matched
case-insensitively, with "Groups" preferred when a config sets both in the
same section.
Test_parseOpenSSLConf_SectionPriorityOverNamePriorityverifies thatCurvesin the earlier preferredsystem_default_sectwins overGroupsin the later preferred
reqsection.cryptographic-asset components or linked to the TLS protocol component --
left as a follow-up, same as the other directives this plugin already
extracts.
Scope:
Groups/Curvesare recorded as a plain string property (theia:openssl:Groups). They are not yet modelled as cryptographic-asset components or linked to the TLS protocol component, and case-insensitive matching covers these two names only. Both are left for follow-ups. Part of #212.Testing
go build ./...,go vet ./...,go test ./...-- all clean, 0 regressions,including the new section-priority test.
Note on this PR
This replaces PR #236, which was accidentally closed by GitHub's
force-push/branch-takeover protection during a local rebase incident (an
amendon a shallow clone silently dropped the real parent commit). Thebranch content here is unchanged in substance from #236's last reviewed
state, plus the requested review fixes from that thread (case-insensitive
"legacy alias" wording, the added section-priority test, and a tightened
commit message/scope note). #236 itself could not be reopened through the
GitHub API once closed this way.
Signed-off-by: Semyon Andreev q2quantum.app@gmail.com