ROX-35107: Add Konflux pipeline check for post-quantum crypto policy#3463
ROX-35107: Add Konflux pipeline check for post-quantum crypto policy#3463vladbologa wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3463 +/- ##
=======================================
Coverage 27.34% 27.34%
=======================================
Files 95 95
Lines 5420 5420
Branches 2545 2545
=======================================
Hits 1482 1482
Misses 3211 3211
Partials 727 727
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.tekton/collector-component-pipeline.yaml (1)
577-587: ⚡ Quick winConsider adding an explicit file existence check for clearer error messages.
Currently, if
/etc/crypto-policies/back-ends/opensslcnf.configdoesn't exist, bothgrepandcatwill emit "No such file or directory" errors. Adding an explicit check would provide a clearer diagnostic message distinguishing "file missing" from "marker not found."📋 Suggested improvement
#!/bin/bash set -euo pipefail echo "Verifying post-quantum crypto policy configuration..." + if [[ ! -f /etc/crypto-policies/back-ends/opensslcnf.config ]]; then + echo "FAIL: /etc/crypto-policies/back-ends/opensslcnf.config not found" + echo "The crypto-policies configuration file is missing from the image." + exit 1 + fi if grep -q X25519MLKEM768 /etc/crypto-policies/back-ends/opensslcnf.config; then echo "PASS: X25519MLKEM768 found in /etc/crypto-policies/back-ends/opensslcnf.config" else echo "FAIL: X25519MLKEM768 not found in /etc/crypto-policies/back-ends/opensslcnf.config" echo "The post-quantum crypto policy (DEFAULT:PQ) may not be properly applied." cat /etc/crypto-policies/back-ends/opensslcnf.config exit 1 fi🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.tekton/collector-component-pipeline.yaml around lines 577 - 587, Add an explicit file existence check before the grep command in the post-quantum crypto policy verification script. Before attempting to grep for X25519MLKEM768 in /etc/crypto-policies/back-ends/opensslcnf.config, use a test conditional (like [ -f ]) to verify the file exists. If the file doesn't exist, output a specific error message distinguishing this from the case where the file exists but lacks the marker, then exit with status 1. This ensures clear diagnostic messages for "file missing" versus "marker not found" scenarios.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.tekton/collector-component-pipeline.yaml:
- Around line 577-587: Add an explicit file existence check before the grep
command in the post-quantum crypto policy verification script. Before attempting
to grep for X25519MLKEM768 in /etc/crypto-policies/back-ends/opensslcnf.config,
use a test conditional (like [ -f ]) to verify the file exists. If the file
doesn't exist, output a specific error message distinguishing this from the case
where the file exists but lacks the marker, then exit with status 1. This
ensures clear diagnostic messages for "file missing" versus "marker not found"
scenarios.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 26994889-28a8-47dc-82cb-6fe698c0fa19
📒 Files selected for processing (1)
.tekton/collector-component-pipeline.yaml
44d158f to
3922a2c
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Misha Sugakov <537715+msugakov@users.noreply.github.com>
206aae4 to
77ce121
Compare
Description
Verify that the built collector image has
X25519MLKEM768in/etc/crypto-policies/back-ends/opensslcnf.config, guarding against regressions of theDEFAULT:PQcrypto-policy setting.I added this check because:
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
CI is sufficient.