-
Notifications
You must be signed in to change notification settings - Fork 13
Make the Security Scan workflow run after each merge #66
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
base: main
Are you sure you want to change the base?
Conversation
Merge from code editor main
branches: | ||
- 'main' | ||
- '*.*' | ||
workflow_dispatch: |
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.
Do we want manual execution here or triggered by a successful security scan workflow (or called by the security scanning)
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 added workflow_dispatch
to have some flexibility of invoking the build workflow in case we need to create a new build. But I get your point - a build should only be created if the security scan is successful. I will change this trigger to workflow_call
so that the build workflow can only be triggered by another GitHub action workflow. This will prevent anyone from invoking the build workflow directly form the GitHub UI.
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.
Discussed this offline, there are two options to achieve this:
workflow_call
as the trigger - This trigger can be used to disable invoking the workflow from the GitHub UI, but it invokes the build workflow as a nested workflow within the Security Scan workflow. Example: https://github.com/sachinh-amazon/code-editor/actions/runs/18383280937 This makes it harder to debug as any failure in the build workflow will be counted as failure for the Security Scan workflow.workflow_run
as the trigger - This trigger will automatically invoke the build workflow after each successful Security Scan workflow run. That means that the build workflow will be invoked every night. Nightly build workflow runs are not required at the moment. This trigger can be used in the future if nightly runs are required.
So we will keep the workflow_dispatch
trigger as is for now.
Description of changes:
main
and*.*
branches - This trigger has been modified from the previous trigger where the workflow used to get invoked in response to a PR. This update is to mitigate from a security risk.standalone-run
has been introduced in the Security Scan workflow. This boolean will control the build workflow invocation if the Security Scan workflow has been manually invoked for testing.Testing
<digit>.<digit>
: https://github.com/sachinh-amazon/code-editor/actions/runs/18369386357By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.