Modify buildah task to allow creating SAST scan tasks via kustomize#1525
Merged
Conversation
tkdchen
reviewed
Oct 23, 2024
chmeliik
reviewed
Oct 23, 2024
c7a2d47 to
96ec78f
Compare
chmeliik
reviewed
Oct 24, 2024
chmeliik
reviewed
Oct 24, 2024
e075f06 to
d7b02b4
Compare
chmeliik
approved these changes
Oct 25, 2024
Contributor
chmeliik
left a comment
There was a problem hiding this comment.
LGTM, just to re-generate the other buildah variants
d7b02b4 to
07b5239
Compare
tkdchen
approved these changes
Oct 25, 2024
Contributor
|
/retest |
07b5239 to
1d1bb9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need to modify buildah task in order to be able to create SAST scanning tasks that has identical build logic with the original buildah task, but also have ability to:
Also
SAST scan tasks can be created using the following kustomize file:
Example PR could be found here.
Then, the SAST task can be used in the pipeline by just copying original
buildahtask definition and replacing the task bundle, for example:... - name: build-container-sast params: - name: IMAGE value: $(params.output-image) - name: DOCKERFILE value: $(params.dockerfile) - name: CONTEXT value: $(params.path-context) - name: HERMETIC value: $(params.hermetic) - name: PREFETCH_INPUT value: $(params.prefetch-input) - name: IMAGE_EXPIRES_AFTER value: $(params.image-expires-after) - name: COMMIT_SHA value: $(tasks.clone-repository.results.commit) - name: BUILD_ARGS value: - $(params.build-args[*]) - name: BUILD_ARGS_FILE value: $(params.build-args-file) runAfter: - prefetch-dependencies taskRef: params: - name: name value: buildah-sast - name: bundle value: quay.io/org/sast-task-bundle:tag@sha1234abcd - name: kind value: task resolver: bundles when: - input: $(tasks.init.results.build) operator: in values: - "true" workspaces: - name: source workspace: workspace ...