Skip to content

Conversation

sachinh-amazon
Copy link
Contributor

@sachinh-amazon sachinh-amazon commented Oct 9, 2025

Description of changes:

  1. Invokes the Security Scan workflow in response to a merge on the 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.
  2. Modifies the build workflow trigger - The build workflow is no longer automatically invoked for each merge. The Security Scan workflow is now responsible for invoking the build workflow after it completes successfully. This is to ensure that a build workflow is triggered only when a branch does not contain security vulnerabilities.
  3. An additional boolean 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

  1. Verified a successful run: https://github.com/sachinh-amazon/code-editor/actions/runs/18368985521
  2. Verified that the workflow is no-op for branches that don't follow pattern <digit>.<digit>: https://github.com/sachinh-amazon/code-editor/actions/runs/18369386357

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sachinh-amazon sachinh-amazon requested a review from a team as a code owner October 9, 2025 08:15
branches:
- 'main'
- '*.*'
workflow_dispatch:
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author

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:

  1. 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.
  2. 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.

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.

2 participants