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

contrib: Add GitLab CI template to deeply integrated with GitLab Container Scanning #376

Merged
merged 1 commit into from Jan 26, 2020

Conversation

tnir
Copy link
Contributor

@tnir tnir commented Jan 18, 2020

Adds GitLab CI template with deep integration with GitLab Container Scanning (report) (part of GitLab Security Product)

cf. https://gitlab.com/gitlab-org/gitlab/blob/f156adcec4c48d304128f2a4a8987f9ad6408591/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml

TODO

@knqyf263
Copy link
Collaborator

@tnir Thank you for the awesome contribution! We'll have a look soon.

contrib/Trivy.gitlab-ci.yml Outdated Show resolved Hide resolved
contrib/Trivy.gitlab-ci.yml Outdated Show resolved Hide resolved
contrib/Trivy.gitlab-ci.yml Outdated Show resolved Hide resolved
@tnir tnir force-pushed the gitlab-ci-template branch 3 times, most recently from df726fe to 94f3782 Compare January 23, 2020 02:06
contrib/Trivy.gitlab-ci.yml Outdated Show resolved Hide resolved
@tnir tnir force-pushed the gitlab-ci-template branch 2 times, most recently from ac7e701 to a3972fd Compare January 23, 2020 02:38
@tnir
Copy link
Contributor Author

tnir commented Jan 23, 2020

Templating does looks working well: https://gitlab.com/tnir/trivy-ci-test/-/jobs/412246842

@tnir tnir requested a review from knqyf263 January 23, 2020 03:02
contrib/Trivy.gitlab-ci.yml Outdated Show resolved Hide resolved
- apk add --no-cache curl docker-cli
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b /usr/local/bin
- curl -sSL -o /tmp/trivy-gitlab.tpl https://github.com/aquasecurity/trivy/raw/master/contrib/gitlab.tpl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way we could not fetch this from master? If the template changes and the downloaded binary does not support it, this could cause incompatibilities.

Maybe we can parse $(trivy --version) and pull from the tag instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. We should use environment variables to fix. With environment variables with the default value of Trivy version, (GitLab CI) users can inject arbitrary version of (Trivy-GitLab) template, which will reduce regression and be helpful for users of non-latest version GitLab.

@tnir
Copy link
Contributor Author

tnir commented Jan 24, 2020

Blocked by PR #387 (issue #386)

@tnir
Copy link
Contributor Author

tnir commented Jan 24, 2020

Task list was moved to the description of the PR.

@tnir tnir force-pushed the gitlab-ci-template branch 3 times, most recently from 04b9c09 to 8f0d8ac Compare January 24, 2020 17:00
contrib/Trivy.gitlab-ci.yml Outdated Show resolved Hide resolved
@knqyf263
Copy link
Collaborator

@tnir I've merged #327. I didn't check it carefully😓 I appreciate your contribution.

… Scanning

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
@knqyf263 knqyf263 merged commit 9707c7b into aquasecurity:master Jan 26, 2020
@knqyf263
Copy link
Collaborator

Thanks! Awesome work!

@tnir tnir deleted the gitlab-ci-template branch January 26, 2020 15:05
GuaoGuao pushed a commit to GuaoGuao/trivy that referenced this pull request Jun 24, 2020
… Scanning (aquasecurity#376)

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
liamg pushed a commit that referenced this pull request Jun 7, 2022
… Scanning (#376)

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
josedonizetti pushed a commit to josedonizetti/trivy that referenced this pull request Jun 24, 2022
Co-authored-by: Liam Galvin <liam.galvin@aquasec.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants