Skip to content

Instantly share code, notes, and snippets.

@karthikjeeyar
Created March 25, 2024 03:55
Show Gist options
  • Save karthikjeeyar/c3c4bf69df5e035f5dd4115cbccd5bf4 to your computer and use it in GitHub Desktop.
Save karthikjeeyar/c3c4bf69df5e035f5dd4115cbccd5bf4 to your computer and use it in GitHub Desktop.
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: invalid-acs-image-check-task
labels:
"backstage.io/kubernetes-id": quarkus-app
annotations:
task.results.format: application/json
task.results.type: roxctl-image-check
task.results.container: step-report-json
task.output.location: logs
spec:
steps:
- name: report-json
image: bash:latest
script: |
#!/usr/bin/env bash
echo '{"summary":{
"critical": 13,
"high": 29,
"medium": 32,
"low": 3
}}'
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: acs-image-scan-task
labels:
"backstage.io/kubernetes-id": quarkus-app
annotations:
task.results.format: application/json
task.results.type: roxctl-image-scan
task.results.container: step-report-json
task.output.location: logs
spec:
steps:
- name: report-json
image: bash:latest
script: |
#!/usr/bin/env bash
echo '{
result: {
summary: {
CRITICAL: 0,
IMPORTANT: 1,
LOW: 61,
MODERATE: 40,
'TOTAL-COMPONENTS': 54,
'TOTAL-VULNERABILITIES': 102,
},
vulnerabilities: [
{
cveId: 'CVE-2005-2945',
cveSeverity: 'LOW',
cveInfo: 'https://nvd.nist.gov/vuln/detail/CVE-2005-2945',
componentName: 'arc',
componentVersion: '3.5.0',
componentFixedVersion: '2.3.1',
},
{
cveId: 'CVE-2005-2992',
cveSeverity: 'LOW',
cveInfo: 'https://nvd.nist.gov/vuln/detail/CVE-2005-2992',
componentName: 'arc',
componentVersion: '3.5.0',
componentFixedVersion: '1.7.1',
},
{
cveId: 'CVE-2021-3468',
cveSeverity: 'MODERATE',
cveInfo: 'https://access.redhat.com/security/cve/CVE-2021-3468',
componentName: 'avahi-libs',
componentVersion: '0.7-20.el8.aarch64',
componentFixedVersion: '',
},
{
cveId: 'CVE-2021-36217',
cveSeverity: 'MODERATE',
cveInfo: 'https://access.redhat.com/security/cve/CVE-2021-36217',
componentName: 'avahi-libs',
componentVersion: '0.7-20.el8.aarch64',
componentFixedVersion: '',
},
{
cveId: 'CVE-2023-38469',
cveSeverity: 'MODERATE',
cveInfo: 'https://access.redhat.com/security/cve/CVE-2023-38469',
componentName: 'avahi-libs',
componentVersion: '0.7-20.el8.aarch64',
componentFixedVersion: '',
},
{
cveId: 'CVE-2023-38470',
cveSeverity: 'MODERATE',
cveInfo: 'https://access.redhat.com/security/cve/CVE-2023-38470',
componentName: 'avahi-libs',
componentVersion: '0.7-20.el8.aarch64',
componentFixedVersion: '',
},
{
cveId: 'CVE-2023-38471',
cveSeverity: 'MODERATE',
cveInfo: 'https://access.redhat.com/security/cve/CVE-2023-38471',
componentName: 'avahi-libs',
componentVersion: '0.7-20.el8.aarch64',
componentFixedVersion: '',
}]}}'
---
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: pipelinerun-with-invalid-acs-image-check
labels:
"backstage.io/kubernetes-id": quarkus-app
spec:
pipelineSpec:
tasks:
- name: acs-image-check-task
taskRef:
name: acs-image-scan-task
- name: invalid-acs-image-check-task
taskRef:
name: invalid-acs-image-check-task
@karthikjeeyar
Copy link
Author

Update "backstage.io/kubernetes-id": <your-app-names-goes-here> label to view this pipelinerun in backstage instance.

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