-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(2692): create custom action for image scanning #4060
Conversation
718ca72
to
d900cc4
Compare
runs: | ||
using: composite | ||
steps: | ||
- name: Build Docker Second Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to build the second image?
- name: Build Docker Second Image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a typo?
685f562
to
f81e1a6
Compare
Terraform Format and Style 🖌
|
Terraform Format and Style 🖌
|
.github/workflows/deploy-test.yml
Outdated
@@ -176,3 +176,40 @@ jobs: | |||
{ | |||
"text": ":warning: Deployment to Test failed! [Investigate here](https://github.com/bcgov/platform-services-registry/)" | |||
} | |||
|
|||
scan-images-for-vulnerabilities: | |||
needs: [deploy] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can run this job in parallel with the deployment job
.github/workflows/deploy-dev.yml
Outdated
@@ -218,3 +218,52 @@ jobs: | |||
{ | |||
"text": ":warning: Deployment to Prod failed! [Investigate here](https://github.com/bcgov/platform-services-registry/)" | |||
} | |||
|
|||
scan-images-for-vulnerabilities: | |||
needs: [deploy] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can run this job in parallel with the deployment job
.github/workflows/deploy-dev.yml
Outdated
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we writing packages?
.github/workflows/deploy-test.yml
Outdated
- name: App | ||
uses: ./.github/actions/scan-docker-image | ||
with: | ||
image: ${{ env.GITHUB_REGISTRY }}/bcgov/pltsvc:${{ github.sha }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sha
?
with: | ||
image-ref: ${{ inputs.image }} | ||
format: sarif | ||
output: trivy-results-${{ inputs.image }}.sarif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image
is a URL contains /
, not sure that creating sub directory is ideal for this case; try without the prefix as each job runs one by one?
8d95d51
to
ebe097f
Compare
image: | ||
description: A docker image | ||
required: true | ||
category: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove category
and use image
for sarif
category.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@junminahn Done!
0ce0b96
to
31944fe
Compare
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Terraform Format and Style 🖌
|
Terraform Format and Style 🖌
|
Quality Gate passedIssues Measures |
No description provided.