Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(KONFLUX-3663): format PipelineRun files and upload SAST results #1613

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 25 additions & 46 deletions .tekton/scanner-component-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: scanner-component-pipeline

spec:

finally:
- name: slack-notification
params:
Expand All @@ -26,7 +24,6 @@ spec:
- name: kind
value: task
resolver: bundles

- name: show-sbom
params:
- name: IMAGE_URL
Expand All @@ -40,7 +37,6 @@ spec:
- name: kind
value: task
resolver: bundles

params:
- description: Source Repository URL
name: git-url
Expand All @@ -65,13 +61,11 @@ spec:
name: output-tag-suffix
type: string
- default: .
description: Path to the source code of an application's component from where
to build image.
description: Path to the source code of an application's component from where to build image.
name: path-context
type: string
- default: Dockerfile
description: Path to the Dockerfile inside the context specified by parameter
path-context
description: Path to the Dockerfile inside the context specified by parameter path-context
name: dockerfile
type: string
- default: "false"
Expand All @@ -95,8 +89,7 @@ spec:
name: java
type: string
- default: ""
description: Image tag expiration time, time values could be something like
1h, 2d, 3w for hours, days, and weeks, respectively.
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
type: string
- default: "true"
Expand All @@ -107,15 +100,14 @@ spec:
description: Build stage to target in container build
name: build-target-stage
type: string
- default: [ ]
- default: []
description: List of scanner-data file names to fetch to include in the container build.
name: blobs-to-fetch
type: array
- default: "1d"
description: This sets the expiration time for intermediate OCI artifacts produced and used during builds after which they can be garbage collected.
name: oci-artifact-expires-after
type: string

results:
- description: ""
name: IMAGE_URL
Expand All @@ -132,12 +124,9 @@ spec:
- description: ""
name: JAVA_COMMUNITY_DEPENDENCIES
value: $(tasks.build-container-amd64.results.JAVA_COMMUNITY_DEPENDENCIES)

workspaces:
- name: git-auth

tasks:

- name: init
params:
- name: image-url
Expand All @@ -158,7 +147,6 @@ spec:
- name: kind
value: task
resolver: bundles

- name: clone-repository
params:
- name: url
Expand All @@ -185,11 +173,10 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]
values: ["true"]
workspaces:
- name: basic-auth
workspace: git-auth

- name: determine-image-tag
params:
- name: TAG_SUFFIX
Expand All @@ -198,11 +185,10 @@ spec:
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
taskRef:
name: determine-image-tag

- name: fetch-scanner-data
params:
- name: blobs-to-fetch
value: [ "$(params.blobs-to-fetch[*])" ]
value: ["$(params.blobs-to-fetch[*])"]
- name: SOURCE_ARTIFACT
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
- name: ociStorage
Expand All @@ -211,7 +197,6 @@ spec:
value: $(params.oci-artifact-expires-after)
taskRef:
name: fetch-scanner-data

- name: prefetch-dependencies
params:
- name: input
Expand All @@ -231,7 +216,6 @@ spec:
- name: kind
value: task
resolver: bundles

- name: build-container-amd64
params:
- name: IMAGE
Expand Down Expand Up @@ -269,8 +253,7 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]

values: ["true"]
- name: build-container-s390x
params:
- name: IMAGE
Expand Down Expand Up @@ -310,8 +293,7 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]

values: ["true"]
- name: build-container-ppc64le
params:
- name: IMAGE
Expand Down Expand Up @@ -351,8 +333,7 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]

values: ["true"]
- name: build-container-arm64
params:
- name: IMAGE
Expand Down Expand Up @@ -392,8 +373,7 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]

values: ["true"]
- name: build-image-manifest
params:
- name: IMAGE
Expand All @@ -420,8 +400,7 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]

values: ["true"]
- name: build-image-manifest-konflux
params:
- name: IMAGE
Expand All @@ -448,8 +427,7 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]

values: ["true"]
- name: build-source-image
params:
- name: BINARY_IMAGE
Expand All @@ -470,11 +448,10 @@ spec:
when:
- input: $(tasks.init.results.build)
operator: in
values: [ "true" ]
values: ["true"]
- input: $(params.build-source-image)
operator: in
values: [ "true" ]

values: ["true"]
- name: deprecated-base-image-check
params:
- name: IMAGE_URL
Expand All @@ -493,8 +470,7 @@ spec:
when:
- input: $(params.skip-checks)
operator: in
values: [ "false" ]

values: ["false"]
- name: clair-scan
params:
- name: image-digest
Expand All @@ -513,12 +489,15 @@ spec:
when:
- input: $(params.skip-checks)
operator: in
values: [ "false" ]

values: ["false"]
- name: sast-snyk-check
params:
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: image-digest
value: $(tasks.build-container.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-container.results.IMAGE_URL)
taskRef:
params:
- name: name
Expand All @@ -531,8 +510,9 @@ spec:
when:
- input: $(params.skip-checks)
operator: in
values: [ "false" ]

values: ["false"]
runAfter:
- build-container
- name: clamav-scan
params:
- name: image-digest
Expand All @@ -551,8 +531,7 @@ spec:
when:
- input: $(params.skip-checks)
operator: in
values: [ "false" ]

values: ["false"]
- name: sbom-json-check
params:
- name: IMAGE_URL
Expand All @@ -571,4 +550,4 @@ spec:
when:
- input: $(params.skip-checks)
operator: in
values: [ "false" ]
values: ["false"]