LCORE-858: konflux - activate SAST Snyk Checks#867
LCORE-858: konflux - activate SAST Snyk Checks#867tisnik merged 1 commit intolightspeed-core:mainfrom
Conversation
Signed-off-by: Haoyu Sun <hasun@redhat.com>
WalkthroughA new ARGS parameter is added to the sast-snyk-check-oci-ta task invocations in two Tekton pipeline files. The ARGS value provides Snyk CLI arguments: project name, report flag, and organization UUID. These changes augment task execution without altering control flow. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.tekton/lightspeed-stack-pull-request.yaml (1)
407-408: Security: Hardcoded organization UUID should be externalized.Same issue as in
.tekton/lightspeed-stack-push.yaml(lines 404-405). The Snyk organization UUID is hardcoded and should be stored as a secret or injected parameter to avoid exposing sensitive organizational information in version control.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.tekton/lightspeed-stack-pull-request.yaml(1 hunks).tekton/lightspeed-stack-push.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-pr
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: e2e_tests (ci)
- GitHub Check: e2e_tests (azure)
🔇 Additional comments (1)
.tekton/lightspeed-stack-push.yaml (1)
404-405: Verify that the sast-snyk-check-oci-ta task accepts the ARGS parameter.The
sast-snyk-check-oci-ta:0.4task does not appear in public Tekton Hub documentation or public repositories. This task is likely internal to your organization. Verification of ARGS parameter support requires access to the task definition file to confirm the parameters it accepts.
| - name: ARGS | ||
| value: --project-name=lightspeed-stack --report --org=dca2ca89-7e51-4a3a-b7a5-6ad5633057b8 |
There was a problem hiding this comment.
Hardcoded organization UUID should be externalized to a secret.
The Snyk organization UUID (dca2ca89-7e51-4a3a-b7a5-6ad5633057b8) is hardcoded in the pipeline file. This is sensitive organizational information that should be stored as a Tekton secret or pipeline parameter rather than exposed in version control.
Consider refactoring to use a parameter or secret reference:
- name: ARGS
value: --project-name=lightspeed-stack --report --org=$(params.snyk-org-id)Then define snyk-org-id as a parameter that references a secret or is injected from a secure store.
🤖 Prompt for AI Agents
In .tekton/lightspeed-stack-push.yaml around lines 404-405 the Snyk organization
UUID is hardcoded; replace the literal value with a parameter or secret
reference (for example use --org=$(params.snyk-org-id) or inject from a secret
via taskRun/pipelineResource) and update the task/pipeline definition to declare
the snyk-org-id parameter and/or mount a tekton secret reference that provides
the org ID; ensure the secret is created in the cluster and the
pipeline/task/pipelinerun binds that secret or parameter so the org UUID is no
longer stored in version control.
|
PTAL at coderabbits comments |
Description
activate SAST Snyk Checks on Konflux and upload reports to Snyk.
Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.