Skip to content

fix(ci): update curl pin to pqc-enabled tag so PQC keys are generated#3579

Open
dmihalcik-virtru wants to merge 2 commits into
mainfrom
fix/ci-pqc-curl-pin
Open

fix(ci): update curl pin to pqc-enabled tag so PQC keys are generated#3579
dmihalcik-virtru wants to merge 2 commits into
mainfrom
fix/ci-pqc-curl-pin

Conversation

@dmihalcik-virtru
Copy link
Copy Markdown
Member

@dmihalcik-virtru dmihalcik-virtru commented Jun 5, 2026

Summary

  • Updates the curl pin in test/start-up-with-containers/action.yaml from watch-sh-fix to pqc-enabled tag
  • The watch-sh-fix tag predates PQC support in init-temp-keys.sh, so kas-xwing-private.pem and related files were never generated
  • The pqc-enabled tag points to main HEAD which runs go run ./service/cmd/keygen to produce the PQC key pairs needed by start-additional-kas when pqc-enabled is true

Test plan

  • CI passes with PQC keys being generated correctly
  • start-additional-kas works when pqc-enabled: true

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated test environment configuration to source dependencies from the latest stable release version.

The watch-sh-fix tag predates PQC support in init-temp-keys.sh, so
kas-xwing-private.pem and related files were never generated. The
pqc-enabled tag points to main HEAD which already runs
`go run ./service/cmd/keygen` to produce the PQC key pairs needed by
start-additional-kas when pqc-enabled is true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
@dmihalcik-virtru dmihalcik-virtru requested a review from a team as a code owner June 5, 2026 21:27
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the CI pipeline to use a more recent version of key infrastructure scripts. By switching to the 'pqc-enabled' tag, the build process now correctly generates the necessary PQC key pairs required for testing additional KAS configurations.

Highlights

  • CI Configuration Update: Updated the curl download source in the CI action from the 'watch-sh-fix' tag to the 'pqc-enabled' tag.
  • PQC Support: Ensured that PQC-related keys are correctly generated by pointing to a version of the scripts that includes PQC support.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


The scripts were old and lacking grace, / PQC keys had no place. / A tag was swapped, the path is clear, / Now tests run right, without a fear.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges.

Review Change Stack

Warning

Review limit reached

@dmihalcik-virtru, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 35 minutes and 6 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c914f412-3315-482b-9eed-7575ddd8548c

📥 Commits

Reviewing files that changed from the base of the PR and between 045f635 and 29f065e.

📒 Files selected for processing (1)
  • test/start-additional-kas/action.yaml
📝 Walkthrough

Walkthrough

The PR updates a GitHub Actions composite action to fetch three deployment scripts from the pqc-enabled tag instead of watch-sh-fix, affecting the curl URLs that download init-temp-keys.sh, docker-compose.yaml, and watch.sh during container setup.

Changes

Deployment Script Tag Update

Layer / File(s) Summary
Update deployment script source tag
test/start-up-with-containers/action.yaml
The composite action's download step changes the source tag for init-temp-keys.sh, docker-compose.yaml, and watch.sh from watch-sh-fix to pqc-enabled.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

size/s

Suggested reviewers

  • pflynn-virtru

Poem

A tag update, simple and neat,
From watch-sh-fix to pqc-enabled complete,
Three scripts now flow from a newer source,
The container setup stays on course! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating the curl pin from 'watch-sh-fix' to 'pqc-enabled' tag to enable PQC key generation in CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-pqc-curl-pin

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 and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the GitHub Actions workflow to download setup scripts and docker-compose files using the pqc-enabled tag instead of watch-sh-fix. The review feedback recommends adding the -sSfL flags to the curl commands to ensure the step fails immediately if an HTTP error occurs, preventing downstream failures from corrupted or missing files.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +129 to +131
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The curl commands do not use the -f / --fail flag. By default, curl does not return a non-zero exit code when encountering HTTP errors (such as 404 Not Found or 500 Internal Server Error). Instead, it will write the error response body to the destination files, which will cause confusing failures in subsequent steps when the runner attempts to execute the invalid shell scripts or parse the invalid YAML.

Using -sSfL ensures that curl fails the step immediately on HTTP errors, runs silently unless there is an error, and correctly follows any redirects.

        curl -sSfL https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
        curl -sSfL https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
        curl -sSfL https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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.

Inline comments:
In `@test/start-up-with-containers/action.yaml`:
- Around line 129-131: The three curl downloads (the URLs that write to
otdf-test-platform/.github/scripts/init-temp-keys.sh,
otdf-test-platform/docker-compose.yaml, and
otdf-test-platform/.github/scripts/watch.sh) must include integrity checks:
either pin the URLs to an immutable commit SHA instead of the "pqc-enabled" tag,
or (if tag use is required) fetch a trusted checksum/signature for each file and
verify it before saving/executing; implement a post-download verification step
that computes sha256 (or verifies a GPG signature) and fails the workflow if the
checksum/signature does not match, and ensure the verified files are only
executed later at the existing execution points (the script invocations around
lines where these files are run) after successful verification.
- Around line 129-131: The scripts are being fetched from the hardcoded tag
"pqc-enabled" which can mismatch the checked-out platform ref
(inputs.platform-ref); update the curl download URLs in action.yaml so the three
fetched files (init-temp-keys.sh, docker-compose.yaml, watch.sh) use the same
ref as the platform checkout (inputs.platform-ref) instead of the fixed tag,
ensuring downloads are parameterized to reference inputs.platform-ref so scripts
and platform code remain in sync.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a4fccfd3-1d3b-4c95-909d-2f2301950b1c

📥 Commits

Reviewing files that changed from the base of the PR and between 626ce47 and 045f635.

📒 Files selected for processing (1)
  • test/start-up-with-containers/action.yaml

Comment on lines +129 to +131
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Security: Downloaded scripts lack integrity verification.

The three scripts are fetched via curl from a remote GitHub URL without any checksum, signature, or hash verification. This creates a supply chain security risk:

  1. If the pqc-enabled tag is mutable (can be moved to point to different commits), an attacker who compromises the repository could inject malicious code.
  2. Even with an immutable tag, a compromised GitHub account or man-in-the-middle attack could serve malicious scripts.
  3. The scripts are executed with shell privileges (lines 183, 295) and can modify the test environment.

The PR description states the tag "points to main HEAD," which is ambiguous—if the tag is intended to track main, this introduces non-deterministic builds and increases the attack surface.

🛡️ Recommended fix to add integrity verification

Option 1: Use commit SHAs instead of tags for immutability

-        curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
-        curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
-        curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh
+        # Replace COMMIT_SHA with the actual commit SHA of the pqc-enabled tag
+        COMMIT_SHA="<commit-sha-of-pqc-enabled-tag>"
+        curl https://raw.githubusercontent.com/opentdf/platform/${COMMIT_SHA}/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
+        curl https://raw.githubusercontent.com/opentdf/platform/${COMMIT_SHA}/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
+        curl https://raw.githubusercontent.com/opentdf/platform/${COMMIT_SHA}/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh

Option 2: Add checksum verification after download

         curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
+        echo "<expected-sha256-checksum>  otdf-test-platform/.github/scripts/init-temp-keys.sh" | sha256sum --check
         curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
+        echo "<expected-sha256-checksum>  otdf-test-platform/docker-compose.yaml" | sha256sum --check
         curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh
+        echo "<expected-sha256-checksum>  otdf-test-platform/.github/scripts/watch.sh" | sha256sum --check
🤖 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 `@test/start-up-with-containers/action.yaml` around lines 129 - 131, The three
curl downloads (the URLs that write to
otdf-test-platform/.github/scripts/init-temp-keys.sh,
otdf-test-platform/docker-compose.yaml, and
otdf-test-platform/.github/scripts/watch.sh) must include integrity checks:
either pin the URLs to an immutable commit SHA instead of the "pqc-enabled" tag,
or (if tag use is required) fetch a trusted checksum/signature for each file and
verify it before saving/executing; implement a post-download verification step
that computes sha256 (or verifies a GPG signature) and fails the workflow if the
checksum/signature does not match, and ensure the verified files are only
executed later at the existing execution points (the script invocations around
lines where these files are run) after successful verification.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Version mismatch risk between downloaded scripts and platform code.

The scripts are downloaded from the fixed pqc-enabled tag, while the platform repository is checked out at inputs.platform-ref (line 124, default: main). This creates a version skew where the scripts and platform code may be from different commits, potentially causing compatibility issues.

When inputs.platform-ref points to a commit that has diverged from the pqc-enabled tag, there is a risk that:

  • init-temp-keys.sh may not match the key generation logic expected by the checked-out platform version
  • docker-compose.yaml may reference images, volumes, or services incompatible with the platform version
  • watch.sh may use flags or behaviors not supported by the built binary

Consider using the same ref for both the platform checkout and the script downloads to ensure version consistency.

🔧 Proposed fix to align script downloads with platform checkout
-        curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
-        curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
-        curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh
+        PLATFORM_REF="${{ inputs.platform-ref }}"
+        curl https://raw.githubusercontent.com/opentdf/platform/${PLATFORM_REF}/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
+        curl https://raw.githubusercontent.com/opentdf/platform/${PLATFORM_REF}/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
+        curl https://raw.githubusercontent.com/opentdf/platform/${PLATFORM_REF}/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh

This ensures the scripts are from the same ref as the platform code being tested.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
curl https://raw.githubusercontent.com/opentdf/platform/refs/tags/pqc-enabled/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh
PLATFORM_REF="${{ inputs.platform-ref }}"
curl https://raw.githubusercontent.com/opentdf/platform/${PLATFORM_REF}/.github/scripts/init-temp-keys.sh > otdf-test-platform/.github/scripts/init-temp-keys.sh
curl https://raw.githubusercontent.com/opentdf/platform/${PLATFORM_REF}/docker-compose.yaml > otdf-test-platform/docker-compose.yaml
curl https://raw.githubusercontent.com/opentdf/platform/${PLATFORM_REF}/.github/scripts/watch.sh > otdf-test-platform/.github/scripts/watch.sh
🤖 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 `@test/start-up-with-containers/action.yaml` around lines 129 - 131, The
scripts are being fetched from the hardcoded tag "pqc-enabled" which can
mismatch the checked-out platform ref (inputs.platform-ref); update the curl
download URLs in action.yaml so the three fetched files (init-temp-keys.sh,
docker-compose.yaml, watch.sh) use the same ref as the platform checkout
(inputs.platform-ref) instead of the fixed tag, ensuring downloads are
parameterized to reference inputs.platform-ref so scripts and platform code
remain in sync.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 236.041515ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 155.187492ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 434.743957ms
Throughput 230.02 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.427436925s
Average Latency 422.808943ms
Throughput 117.85 requests/second

yq does not support if/elif/else expressions; use the idiomatic
with(select(...); ...) pattern instead to conditionally append PQC
keyring and cryptoProvider entries when pqc-enabled is true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 186.695774ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 99.271455ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 418.264746ms
Throughput 239.08 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.410643911s
Average Latency 442.332545ms
Throughput 112.59 requests/second

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • examples
  • otdfctl
  • sdk
  • service
  • lib/fixtures
  • tests-bdd

See the workflow run for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant