-
Notifications
You must be signed in to change notification settings - Fork 5
Sub-workflow versioning feature #44
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?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -96,6 +96,11 @@ on: | |||||
| required: false | ||||||
| type: string | ||||||
| default: 'scc-complexity' | ||||||
| scc-version: | ||||||
| description: 'Version of SCC workflow to use (e.g., main, v1.0.7)' | ||||||
| required: false | ||||||
| type: string | ||||||
| default: 'main' | ||||||
| perform-language-linting: | ||||||
| description: 'Perform language-specific linting and pre-compilation checks' | ||||||
| required: false | ||||||
|
|
@@ -111,6 +116,11 @@ on: | |||||
| required: false | ||||||
| type: boolean | ||||||
| default: true | ||||||
| trufflehog-version: | ||||||
| description: 'Version of Trufflehog workflow to use (e.g., main, v1.0.7)' | ||||||
| required: false | ||||||
| type: string | ||||||
| default: 'main' | ||||||
| perform-trivy-scan: | ||||||
| description: 'Perform Trivy scan' | ||||||
| required: false | ||||||
|
|
@@ -146,6 +156,11 @@ on: | |||||
| required: false | ||||||
| type: boolean | ||||||
| default: false | ||||||
| grype-version: | ||||||
| description: 'Version of Grype workflow to use (e.g., main, v1.0.7)' | ||||||
| required: false | ||||||
| type: string | ||||||
| default: 'main' | ||||||
| grype-image-fail-on-high: | ||||||
| description: 'Fail pipeline if Grype image scan finds HIGH vulnerabilities' | ||||||
| required: false | ||||||
|
|
@@ -166,6 +181,11 @@ on: | |||||
| required: false | ||||||
| type: boolean | ||||||
| default: false | ||||||
| grype-hab-workflow-version: | ||||||
| description: 'Version of Grype Habitat package scan workflow to use (e.g., main, v1.0.7)' | ||||||
| required: false | ||||||
| type: string | ||||||
| default: 'main' | ||||||
| grype-hab-build-package: | ||||||
| description: 'Build Habitat package from source before scanning (requires checkout)' | ||||||
| required: false | ||||||
|
|
@@ -248,6 +268,11 @@ on: | |||||
| required: false | ||||||
| type: boolean | ||||||
| default: false | ||||||
| polaris-version: | ||||||
| description: 'Version of Polaris SAST workflow to use (e.g., main, v1.0.7)' | ||||||
| required: false | ||||||
| type: string | ||||||
| default: 'main' | ||||||
| polaris-application-name: | ||||||
| description: 'Polaris application name, one of these {Chef-Agents | Chef-Automate | Chef-Chef360 | Chef-Habitat | Chef-Infrastructure-Server | Chef-Shared-Services}' | ||||||
| required: false | ||||||
|
|
@@ -347,7 +372,12 @@ on: | |||||
| description: 'Report Sonar test coverage and other metrics to Atlassian dashboard (Irfans QA dashboard)' | ||||||
| required: false | ||||||
| type: boolean | ||||||
| default: true | ||||||
| default: true | ||||||
| quality-dashboard-version: | ||||||
| description: 'Version of quality dashboard workflow to use (e.g., main, v1.0.7)' | ||||||
| required: false | ||||||
| type: string | ||||||
| default: 'main' | ||||||
| quality-product-name: | ||||||
| description: 'Product name for quality reporting (Chef360, Courier, Inspec)' | ||||||
| required: false | ||||||
|
|
@@ -440,6 +470,11 @@ on: | |||||
| required: false | ||||||
| type: boolean | ||||||
| default: true | ||||||
| sbom-version: | ||||||
| description: 'Version of SBOM workflow to use (e.g., main, v1.0.7)' | ||||||
| required: false | ||||||
| type: string | ||||||
| default: 'main' | ||||||
| export-github-sbom: | ||||||
| description: 'Export SBOM to GitHub' | ||||||
| required: false | ||||||
|
|
@@ -734,7 +769,7 @@ jobs: | |||||
| scc: | ||||||
| name: 'Source code complexity checks' | ||||||
| if: ${{ inputs.perform-complexity-checks == true }} | ||||||
| uses: chef/common-github-actions/.github/workflows/scc.yml@main | ||||||
| uses: chef/common-github-actions/.github/workflows/scc.yml@${{ inputs.scc-version }} | ||||||
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| uses: chef/common-github-actions/.github/workflows/scc.yml@${{ inputs.scc-version }} | |
| uses: chef/common-github-actions/.github/workflows/scc.yml@main |
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Mar 30, 2026
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.
uses: for reusable workflows does not support interpolating the ref with expressions. This will not resolve trufflehog.yml at runtime and will fail workflow parsing/execution.
| uses: chef/common-github-actions/.github/workflows/trufflehog.yml@${{ inputs.trufflehog-version }} | |
| uses: chef/common-github-actions/.github/workflows/trufflehog.yml@main |
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Mar 30, 2026
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.
uses: for reusable workflows does not support dynamic refs via ${{ }}. This grype.yml@${{ inputs.grype-version }} reference will not resolve; refs must be static.
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Mar 30, 2026
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.
uses: refs can’t be built dynamically with ${{ }}. This grype-hab-package-scan.yml@${{ inputs.grype-hab-workflow-version }} call will not resolve as intended.
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Mar 30, 2026
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.
uses: for reusable workflows requires a static ref; ${{ inputs.polaris-version }} won’t be expanded here. This will prevent the Polaris workflow from being called.
| uses: chef/common-github-actions/.github/workflows/polaris-sast.yml@${{ inputs.polaris-version }} | |
| uses: chef/common-github-actions/.github/workflows/polaris-sast.yml@main |
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Mar 30, 2026
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.
uses: for reusable workflows does not support interpolating the ref with ${{ }}. sbom.yml@${{ inputs.sbom-version }} will not resolve; the ref must be static.
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Mar 30, 2026
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.
uses: refs for reusable workflows must be static; ${{ inputs.quality-dashboard-version }} will not be evaluated here. This will break the quality dashboard call.
| uses: chef/common-github-actions/.github/workflows/irfan-quality-dashboard.yml@${{ inputs.quality-dashboard-version }} | |
| uses: chef/common-github-actions/.github/workflows/irfan-quality-dashboard.yml@main |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,12 @@ jobs: | |
| with: | ||
| visibility: ${{ github.event.repository.visibility }} | ||
| language: 'go' # go, ruby, rust | ||
|
|
||
| # Optionally pin individual scan versions (all default to 'main') | ||
| # trufflehog-version: 'v1.0.7' | ||
| # grype-version: 'v1.0.7' | ||
| # sbom-version: 'v1.0.7' | ||
|
|
||
| perform-complexity-checks: true | ||
| perform-trufflehog-scan: true | ||
| perform-trivy-scan: true | ||
|
|
@@ -102,6 +108,43 @@ Tags follow semantic versioning: `v{MAJOR}.{MINOR}.{PATCH}` | |
|
|
||
| When code is merged to `main` in `common-github-actions`, a new patch tag is automatically created via the `create-release-tag.yml` workflow. Manual version bumps can be triggered via workflow dispatch. | ||
|
|
||
| ### Sub-Workflow Versioning (NEW) | ||
|
|
||
| **Each security scan can be pinned to its own version independently**, giving you fine-grained control over which scan versions to use: | ||
|
|
||
| ```yaml | ||
| jobs: | ||
| ci: | ||
| uses: chef/common-github-actions/.github/workflows/[email protected] | ||
| with: | ||
| # Pin individual scan versions | ||
| scc-version: 'v1.0.7' # Use stable SCC | ||
| trufflehog-version: 'v1.0.7' # Use stable TruffleHog | ||
| grype-version: 'main' # Use latest Grype | ||
| grype-hab-workflow-version: 'v1.0.6' # Use older Habitat scan | ||
| polaris-version: 'v1.0.7' # Use stable Polaris | ||
| sbom-version: 'v1.0.7' # Use stable SBOM | ||
| quality-dashboard-version: 'main' # Use latest dashboard | ||
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| **Benefits:** | ||
| - Pin versions that work well with your project | ||
| - Update individual scans without affecting others | ||
| - Test new scan versions without full pipeline upgrade | ||
| - Avoid breaking changes in production workflows | ||
| - Roll back specific scans if issues arise | ||
|
|
||
| **Available Version Inputs:** | ||
| - `scc-version` - Source code complexity checks | ||
| - `trufflehog-version` - Secret scanning | ||
| - `grype-version` - Grype image/source scanning | ||
| - `grype-hab-workflow-version` - Grype Habitat package scanning | ||
| - `polaris-version` - BlackDuck Polaris SAST | ||
| - `sbom-version` - SBOM generation and BlackDuck SCA | ||
| - `quality-dashboard-version` - Quality dashboard reporting | ||
|
|
||
| **Default:** All sub-workflows default to `'main'` if not specified. | ||
|
|
||
| --- | ||
|
|
||
| ## Available Workflows | ||
|
|
@@ -166,6 +209,12 @@ jobs: | |
| version: '1.0.0' | ||
| build-profile: 'cli' | ||
|
|
||
| # Pin scan versions for stability (optional) | ||
| trufflehog-version: 'v1.0.7' | ||
| grype-version: 'v1.0.7' | ||
| polaris-version: 'v1.0.7' | ||
| sbom-version: 'v1.0.7' | ||
|
|
||
| # Code Quality | ||
| perform-complexity-checks: true | ||
| perform-language-linting: true | ||
|
|
@@ -259,6 +308,9 @@ jobs: | |
| visibility: ${{ github.event.repository.visibility }} | ||
| language: 'go' | ||
|
|
||
| # Use specific versions for critical scans | ||
| trufflehog-version: 'v1.0.7' # Pin to stable version | ||
|
|
||
| # Disable everything except security scans | ||
| perform-complexity-checks: false | ||
| perform-language-linting: false | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.