-
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 1 commit
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -347,7 +347,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 | ||||||
|
|
@@ -734,7 +739,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.
Outdated
Show resolved
Hide resolved
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-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-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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,56 @@ This document provides comprehensive information about the security and quality | |||||
|
|
||||||
| ## Pipeline Overview | ||||||
|
|
||||||
| ### Sub-Workflow Versioning | ||||||
|
|
||||||
| **NEW in v1.0.7+**: Each security scan workflow can be pinned to a specific version independently. This allows you to: | ||||||
|
|
||||||
| - **Pin stable versions** that work with your project | ||||||
| - **Update incrementally** - test one scan at a time | ||||||
| - **Avoid breaking changes** - stay on known-good versions | ||||||
| - **Roll back easily** - revert specific scans if needed | ||||||
|
|
||||||
| **Version Control Strategy:** | ||||||
|
|
||||||
| ```yaml | ||||||
| # Example: Mix stable and latest versions | ||||||
| jobs: | ||||||
| ci: | ||||||
| uses: chef/common-github-actions/.github/workflows/[email protected] | ||||||
| with: | ||||||
| # Production-critical scans: pin to tested versions | ||||||
| trufflehog-version: 'v1.0.7' | ||||||
| polaris-version: 'v1.0.7' | ||||||
| sbom-version: 'v1.0.7' | ||||||
|
|
||||||
| # Non-blocking scans: use latest | ||||||
| scc-version: 'main' | ||||||
| grype-version: 'main' | ||||||
|
|
||||||
| # Your scan configurations... | ||||||
| perform-trufflehog-scan: true | ||||||
| perform-blackduck-polaris: true | ||||||
| generate-sbom: true | ||||||
| ``` | ||||||
|
|
||||||
| **Available Version Inputs:** | ||||||
|
|
||||||
| | Input | Workflow | Default | Description | | ||||||
| |-------|----------|---------|-------------| | ||||||
| | `scc-version` | scc.yml | `main` | Source code complexity | | ||||||
| | `trufflehog-version` | trufflehog.yml | `main` | Secret scanning | | ||||||
| | `grype-version` | grype.yml | `main` | Image/source scanning | | ||||||
| | `grype-hab-version` | grype-hab-package-scan.yml | `main` | Habitat package scanning | | ||||||
sean-sype-simmons marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| | `polaris-version` | polaris-sast.yml | `main` | BlackDuck Polaris SAST | | ||||||
| | `sbom-version` | sbom.yml | `main` | SBOM + BlackDuck SCA | | ||||||
| | `quality-dashboard-version` | irfan-quality-dashboard.yml | `main` | Quality reporting | | ||||||
|
|
||||||
| **Recommendation:** Pin to specific versions (e.g., `v1.0.7`) for production repositories. Use `main` for development/testing repositories to get latest features. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Pipeline Overview | ||||||
sean-sype-simmons marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| ## Pipeline Overview | |
| ## Pipeline Diagram |
Uh oh!
There was an error while loading. Please reload this page.