fix: capture re-usable workflows as actions instead of scripts#1374
fix: capture re-usable workflows as actions instead of scripts#1374Ron (rjaegers) wants to merge 10 commits into
Conversation
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 23 | 0 | 0 | 0.24s | |
| ✅ DOCKERFILE | hadolint | 4 | 0 | 0 | 0.27s | |
| ✅ JSON | npm-package-json-lint | yes | no | no | 0.54s | |
| ✅ JSON | prettier | 44 | 6 | 0 | 0 | 0.93s |
| ✅ JSON | v8r | 44 | 0 | 0 | 16.87s | |
| ✅ MARKDOWN | markdownlint | 13 | 0 | 0 | 0 | 1.34s |
| ✅ MARKDOWN | markdown-table-formatter | 13 | 0 | 0 | 0 | 0.29s |
| ✅ REPOSITORY | betterleaks | yes | no | no | 1.19s | |
| ✅ REPOSITORY | checkov | yes | no | no | 30.39s | |
| ✅ REPOSITORY | gitleaks | yes | no | no | 1.3s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.01s | |
| ✅ REPOSITORY | grype | yes | no | no | 70.94s | |
| osv-scanner | yes | 1 | no | 0.82s | ||
| ✅ REPOSITORY | secretlint | yes | no | no | 2.3s | |
| ✅ REPOSITORY | syft | yes | no | no | 2.68s | |
| ✅ REPOSITORY | trivy | yes | no | no | 14.91s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 0.4s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 6.8s | |
| lychee | 115 | 1 | 0 | 37.23s | ||
| ✅ YAML | prettier | 35 | 0 | 0 | 0 | 1.41s |
| ✅ YAML | v8r | 35 | 0 | 0 | 16.26s | |
| ✅ YAML | yamllint | 35 | 0 | 0 | 1.65s |
Detailed Issues
⚠️ SPELL / lychee - 1 error
📝 Summary
---------------------
🔍 Total..........154
🔗 Unique.........126
✅ Successful.....148
⏳ Timeouts.........0
🔀 Redirected......19
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........1
⛔ Unsupported......1
Errors in .github/TOOL_VERSION_ISSUE_TEMPLATE.md
[403] https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads (at 38:7) | Rejected status code: 403 Forbidden
Hint: Followed 19 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
Scanned .devcontainer/cpp/requirements.txt file and found 20 packages
Scanned .devcontainer/docs/requirements.txt file and found 14 packages
Scanned test/embedded-rust/workspace/cortex-m/Cargo.lock file and found 20 packages
Scanned test/embedded-rust/workspace/cortex-mf/Cargo.lock file and found 20 packages
Scanned test/rust/workspace/cargo/Cargo.lock file and found 1 package
Scanned test/rust/workspace/clippy/Cargo.lock file and found 1 package
Scanned test/rust/workspace/test/Cargo.lock file and found 1 package
Scanned package-lock.json file and found 73 packages
End status: 105 dirs visited, 339 inodes visited, 8 Extract calls, 34.575321ms elapsed, 34.575551ms wall time
Total 2 packages affected by 2 known vulnerabilities (0 Critical, 0 High, 0 Medium, 0 Low, 2 Unknown) from 1 ecosystem.
0 vulnerabilities can be fixed.
+-----------------------------------+------+-----------+------------+---------+---------------+---------------------------------------------------+
| OSV URL | CVSS | ECOSYSTEM | PACKAGE | VERSION | FIXED VERSION | SOURCE |
+-----------------------------------+------+-----------+------------+---------+---------------+---------------------------------------------------+
| https://osv.dev/RUSTSEC-2026-0110 | | crates.io | bare-metal | 0.2.5 | -- | test/embedded-rust/workspace/cortex-m/Cargo.lock |
| https://osv.dev/RUSTSEC-2026-0110 | | crates.io | bare-metal | 0.2.5 | -- | test/embedded-rust/workspace/cortex-mf/Cargo.lock |
+-----------------------------------+------+-----------+------------+---------+---------------+---------------------------------------------------+
Notices
📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)
See detailed reports in MegaLinter artifacts
You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:
- oxsecurity/megalinter/flavors/salesforce@v9.6.0 (57 linters)
- oxsecurity/megalinter/flavors/javascript@v9.6.0 (63 linters)
Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)
- Documentation: Custom Flavors
- Command:
npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,DOCKERFILE_HADOLINT,JSON_V8R,JSON_PRETTIER,JSON_NPM_PACKAGE_JSON_LINT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

Show us your support by starring ⭐ the repository
There was a problem hiding this comment.
Pull request overview
This PR refactors two repository utility scripts into reusable GitHub composite actions and updates workflows to consume them, aiming to improve reuse and maintainability of the CI/build logic. It also includes a few security-hardening tweaks (e.g., --ignore-scripts for npm installs and --https-only for downloads).
Changes:
- Replace
.github/scripts/{generate-tool-inventory,merge-devcontainer-metadata}.shwith composite actions under.github/actions/. - Update
wc-build-push.ymlto use the new actions and harden thediffocidownload with checksum verification. - Harden npm installs in CI and tighten some Dockerfile download/quoting patterns.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/wc-build-push.yml | Switches metadata/tool-inventory generation to composite actions; updates diffoci download + checksum. |
| .github/workflows/wc-acceptance-test.yml | Uses npm ci --ignore-scripts before Playwright install. |
| .github/scripts/merge-devcontainer-metadata.sh | Removed (replaced by composite action). |
| .github/scripts/generate-tool-inventory.sh | Removed (replaced by composite action). |
| .github/actions/merge-devcontainer-metadata/action.yml | New composite action implementing devcontainer.metadata label merge logic. |
| .github/actions/generate-tool-inventory/action.yml | New composite action generating tool inventory from SBOM + allowlist. |
| .github/actions/container-size-diff/action.yml | Hardens npm install by adding --ignore-scripts. |
| .devcontainer/rust/Dockerfile | Improves quoting and tightens wget HTTPS behavior. |
| .devcontainer/cpp/Dockerfile | Tightens wget HTTPS behavior and adds safer quoting for args/paths. |
| - name: Generate image label for devcontainer.metadata | ||
| run: | | ||
| set -Eeuo pipefail | ||
|
|
||
| if [ -z "${DEVCONTAINER_METADATA_FILE:-}" ] || [ ! -f "${DEVCONTAINER_METADATA_FILE}" ]; then | ||
| echo "devcontainer-metadata-file input not set or file does not exist, skipping devcontainer.metadata label" | ||
| echo "label=" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Merge the base image's devcontainer.metadata array with this flavor's | ||
| # entry so that flavors inherit base metadata without duplicating it. | ||
| { | ||
| echo -n "label=" | ||
| bash .github/scripts/merge-devcontainer-metadata.sh "${BASE_IMAGE:-}" "${DEVCONTAINER_METADATA_FILE}" | ||
| } >> "$GITHUB_OUTPUT" | ||
| env: | ||
| BASE_IMAGE: ${{ inputs.base-image }} | ||
| DEVCONTAINER_METADATA_FILE: ${{ inputs.devcontainer-metadata-file }} | ||
| uses: philips-software/amp-devcontainer/.github/actions/merge-devcontainer-metadata@fix/package-scripts-as-actions |
| if: ${{ inputs.tool-inventory-file != '' }} | ||
| id: generate-tool-inventory | ||
| uses: philips-software/amp-devcontainer/.github/actions/generate-tool-inventory@fix/package-scripts-as-actions |
| env: | ||
| BASE_IMAGE: ${{ inputs.base-image }} | ||
| DEVCONTAINER_METADATA_FILE: ${{ inputs.devcontainer-metadata-file }} | ||
| uses: philips-software/amp-devcontainer/.github/actions/merge-devcontainer-metadata@6934e07c72c5cc8d89128a5609981e4eb8737d67 # fix/package-scripts-as-actions |
| FLAVOR: ${{ needs.sanitize-image-name.outputs.image-basename }} | ||
| if: ${{ inputs.tool-inventory-file != '' }} | ||
| id: generate-tool-inventory | ||
| uses: philips-software/amp-devcontainer/.github/actions/generate-tool-inventory@6934e07c72c5cc8d89128a5609981e4eb8737d67 # fix/package-scripts-as-actions |
| env: | ||
| BASE_IMAGE: ${{ inputs.base-image }} | ||
| DEVCONTAINER_METADATA_FILE: ${{ inputs.devcontainer-metadata-file }} | ||
| uses: philips-software/amp-devcontainer/.github/actions/merge-devcontainer-metadata@6934e07c72c5cc8d89128a5609981e4eb8737d67 # fix/package-scripts-as-actions |
| FLAVOR: ${{ needs.sanitize-image-name.outputs.image-basename }} | ||
| if: ${{ inputs.tool-inventory-file != '' }} | ||
| id: generate-tool-inventory | ||
| uses: philips-software/amp-devcontainer/.github/actions/generate-tool-inventory@6934e07c72c5cc8d89128a5609981e4eb8737d67 # fix/package-scripts-as-actions |
📦 Container Size AnalysisNote Comparing 📈 Size Comparison Table
|
📦 Container Size AnalysisNote Comparing 📈 Size Comparison Table
|
📦 Container Size AnalysisNote Comparing 📈 Size Comparison Table
|
📦 Container Size AnalysisNote Comparing 📈 Size Comparison Table
|
📦 Container Size AnalysisNote Comparing 📈 Size Comparison Table
|
📦 Container Size AnalysisNote Comparing 📈 Size Comparison Table
|
Signed-off-by: Ron <45816308+rjaegers@users.noreply.github.com>
Signed-off-by: Ron <45816308+rjaegers@users.noreply.github.com>
|



🚀 Hey, I have created a Pull Request
Description of changes
This pull request refactors the implementation of two utility scripts—
generate-tool-inventory.shandmerge-devcontainer-metadata.sh—by replacing them with reusable GitHub composite actions. The workflows are updated to use these actions, which improves maintainability and reusability.Key changes:
Workflow Refactoring and Actionization
generate-tool-inventory.shwith a composite action.github/actions/generate-tool-inventory/action.yml, and updates workflows to use this action for generating tool inventories from SBOMs. [1] [2] [3]merge-devcontainer-metadata.shwith a composite action.github/actions/merge-devcontainer-metadata/action.yml, and updates workflows to use this action for merging devcontainer metadata. [1] [2] [3]✔️ Checklist