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

Adapt pipeline_definitions to include SAST linting logs in OCM descriptor #138

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions .ci/pipeline_definitions
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
machine-controller-manager-provider-gcp:
base_definition:
repo:
source_labels:
- name: cloud.gardener.cnudie/dso/scanning-hints/source_analysis/v1
value:
policy: skip
comment: |
we use gosec for sast scanning. See attached log.
traits:
version:
inject_effective_version: true
Expand Down Expand Up @@ -67,6 +74,16 @@ machine-controller-manager-provider-gcp:
ocm_repository: europe-docker.pkg.dev/gardener-project/releases
release:
nextversion: 'bump_minor'
assets:
- type: build-step-log
step_name: check
purposes:
- lint
- sast
- gosec
comment: |
we use gosec (linter) for SAST scans
see: https://github.com/securego/gosec
publish:
dockerimages:
<<: *default_images
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ main
cmi-plugin

# gosec
gosec-report.sarif
gosec-report.sarif
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ sast: $(GOSEC)

.PHONY: sast-report
sast-report: $(GOSEC)
@./hack/sast.sh --gosec-report true
@./hack/sast.sh --gosec-report true
2 changes: 1 addition & 1 deletion hack/sast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ fi
# Thus, generated code is excluded from gosec scan.
# Nested go modules are not supported by gosec (see https://github.com/securego/gosec/issues/501), so the ./hack folder
# is excluded too. It does not contain productive code anyway.
gosec -exclude-generated -exclude-dir=hack $gosec_report_parse_flags ./...
gosec -exclude-generated -exclude-dir=hack $gosec_report_parse_flags ./...