-
Notifications
You must be signed in to change notification settings - Fork 15
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
security workflow does not repeat nightly scans #481
security workflow does not repeat nightly scans #481
Conversation
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.
Quick question
notify-failure: | ||
if: ${{ github.event_name == 'schedule' && failure() }} | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify failure via Slack | ||
uses: archive/github-actions-slack@master | ||
with: | ||
slack-bot-user-oauth-access-token: ${{ secrets.COREINT_SLACK_TOKEN }} | ||
slack-channel: ${{ secrets.CAOS_COREINT_SLACK_CHANNEL }} | ||
slack-text: "❌ `'newrelic/infrastructure-bundle'`: [security pipeline failed](${{ github.server_url }}/newrelic/infrastructure-bundle/actions/runs/${{ github.run_id }})." |
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.
I get we remove the repeated Trivy check, but do we want to get rid of the notify failure step?
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.
It only notifies failure if github.event_name == 'schedule'
.
We are no longer running this with schedule
because we have the nightly.
For failure on push PR the action will upload the results to the workflow on both success and failure.
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.
🚀
27ad5d5
to
2c15af1
Compare
The reusable security workflow (https://github.com/newrelic/coreint-automation/blob/8e5f750ba1e151b93454c56aeb1f6dbcea0e3b00/.github/workflows/reusable_security.yaml) scans the repo ( codebase ) for vulnerabilities with Trivy.
This cannot be used for
infrastructure-bundle
because we need to build a docker Image and then scan that docker image for vulnerabilities by running trivy in table-mode.We have code that does this in the reusable nightly workflow for docker images. But that workflow also publishes the nightly build so reusing it just to scan the image on pull request does not make sense.
The code that runs the security check on a schedule can be removed because that is being handled by the nightly.
The code that runs the security check on a pull request should be left as is since we do not have a reusable workflow that only builds and scans a docker image.