Skip to content

fix: allow container-size-diff bootstrap without a baseline manifest - #1577

Open
Ron (rjaegers) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-container-size-diff-validation
Open

Ron (rjaegers) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-container-size-diff-validation

Conversation

Copilot AI commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First PR builds of new images fail size analysis when no :edge baseline exists, blocking subsequent supply-chain and integration gates. This change treats confirmed baseline absence as a bootstrap condition without suppressing other failures.

  • Bootstrap reporting: Recognize narrow missing-manifest diagnostics, including normalized Docker Hub references. Report current platform sizes with an explicit “comparison unavailable” explanation; omit previous sizes and deltas.
  • Validation: Keep current-image, authentication, network, unexpected registry and platform-set failures fatal. Reject malformed layer-size data while preserving valid zero-sized images and existing comparisons.
  • Regression coverage: Add mock-inspector cases for bootstrap, diagnostic variants, strict failure boundaries and unchanged comparison behavior.
  • Documentation: Explain the first-image exception and adoption through a fixed actions/vX.Y.Z release. No workflow or edge tagging changes.

Copilot AI and others added 2 commits November 13, 2026 16:43
Co-authored-by: rjaegers <45816308+rjaegers@users.noreply.github.com>
Co-authored-by: rjaegers <45816308+rjaegers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix container-size-diff for missing baseline images fix: allow container-size-diff bootstrap without a baseline manifest Nov 13, 2026
Copilot AI requested a review from Ron (rjaegers) November 13, 2026 16:47
@rjaegers
Ron (rjaegers) marked this pull request as ready for review November 13, 2026 16:57
Copilot AI balanced review requested due to automatic review settings November 13, 2026 16:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Missing implicit :latest normalization prevents bootstrap reports for untagged baselines, while unrecognized SchemaV2Manifest.layers causes valid Docker images to fail validation.

2 open issues
What changed in this PR

This PR addresses first-image bootstrap failures in the reusable build pipeline by allowing container-size-diff to report current sizes when the baseline manifest is confirmed missing.

Changes:

  • Adds bootstrap reporting without inventing previous sizes or deltas.
  • Adds layer-size validation and regression cases for missing baselines and fatal failures.
  • Documents bootstrap behavior and adoption through a pinned actions release.
File Description
docs/​reusable-build-system.md Explains first-build behavior and release adoption.
.github/​actions/​container-size-diff/​test/​container-size-diff.test.js Adds bootstrap, diagnostic, and validation regression cases.
.github/​actions/​container-size-diff/​README.md Documents bootstrap reports and failure boundaries.
.github/​actions/​container-size-diff/​container-size-diff.js Adds missing-baseline handling, current-size reporting, and layer validation.

Review effort: Balanced

if (parts[0] === "docker.io" && parts.length === 2) {
parts.splice(1, 0, "library");
}
return parts.join("/");

const layers =
_.get(manifest, "OCIManifest.layers") || _.get(manifest, "layers", []);
_.get(manifest, "OCIManifest.layers") || _.get(manifest, "layers");
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-base:edge ➔ ghcr.io/philips-software/amp-devcontainer-base:pr-1577

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 102.35 MB 102.35 MB 10 B (0%) 🔽
linux/arm64 98.34 MB 98.34 MB 402 B (0%) 🔽

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 34 0 0 0.36s
✅ DOCKERFILE hadolint 4 0 0 0.58s
✅ JSON npm-package-json-lint yes no no 0.46s
✅ JSON prettier 55 13 0 0 1.12s
✅ JSON v8r 55 0 0 20.41s
⚠️ MARKDOWN markdownlint 31 0 1 0 1.63s
✅ MARKDOWN markdown-table-formatter 31 0 0 0 0.26s
✅ REPOSITORY betterleaks yes no no 1.21s
✅ REPOSITORY checkov yes no no 22.28s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY grype yes no no 100.21s
⚠️ REPOSITORY osv-scanner yes 1 4 2.25s
✅ REPOSITORY secretlint yes no no 1.49s
✅ REPOSITORY syft yes no no 7.04s
✅ REPOSITORY trivy yes no no 10.87s
✅ REPOSITORY trivy-sbom yes no no 0.67s
✅ REPOSITORY trufflehog yes no no 3.46s
⚠️ SPELL lychee 165 2 0 116.28s
✅ YAML prettier 56 0 0 0 1.16s
✅ YAML v8r 56 0 0 15.84s
✅ YAML yamllint 56 0 0 1.6s

Detailed Issues

⚠️ SPELL / lychee - 2 errors
📝 Summary
---------------------
🔍 Total..........301
🔗 Unique.........205
✅ Successful.....294
⏳ Timeouts.........0
🔀 Redirected......32
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........2
⛔ Unsupported......2

Errors in docs/requirements/security.feature
[ERROR] https://slsa.dev/spec/v1.0/threats (at 42:44) | Connection failed. Check network connectivity and firewall settings

Errors in docs/reusable-build-system.md
[404] https://docs.github.com/en/repositories/releasing-projects-on-github/immutable-releases (at 199:168) | Rejected status code: 404 Not Found

Hint: Followed 32 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`
⚠️ MARKDOWN / markdownlint - 1 error
.github/actions/generate-release-summary/README.md:67:401 error MD013/line-length Line length [Expected: 400; Actual: 437]
⚠️ REPOSITORY / osv-scanner - 1 error
warning: Package 'minimatch@10.2.6' is vulnerable to 'CVE-2026-118764' (also known as 'GHSA-g3hv-75wg-m249').
 = CVE-2026-118764: minimatch has potential denial of service via globparts amplification
 = minimatch 10.2.6 contains an attacker-controlled pattern amplification in firstPhasePreProcess() when optimizationLevel >= 2.
   
   researcher: Reid Downing (b1nv0id)
   files: 
   
   - src/index.ts: 690-770
   - src/index.ts: 780-796
   
   issue:
   input-controlled growth of globParts during first-phase preprocessing, followed by quadratic second-phase processing.
   
   the **/../ transformation clones a globparts entry and appends the clone to the same globparts array:

parts.splice(gs, 1)
const other = parts.slice(0)
other[gs] = '**'
globParts.push(other)

this occurs inside a do...while (didSomething) fixpoint loop, allowing generated entries to be processed again.

the expanded globparts array is subsequently processed by secondPhasePreProcess(), which performs pairwise comparisons:

for (let i = 0; i < globParts.length - 1; i++) {
for (let j = i + 1; j < globParts.length; j++) {
this.partsMatch(...)
}
}

an attacker who can supply a glob pattern can therefore cause additional pattern entries to be generated during preprocessing, followed by quadratic pairwise processing, resulting in excessive cpu and memory consumption.

warning: Package 'minimatch@10.2.4' is vulnerable to 'CVE-2026-118764' (also known as 'GHSA-g3hv-75wg-m249').
= CVE-2026-118764: minimatch has potential denial of service via globparts amplification
= minimatch 10.2.6 contains an attacker-controlled pattern amplification in firstPhasePreProcess() when optimizationLevel >= 2.

researcher: Reid Downing (b1nv0id)
files: 

- src/index.ts: 690-770
- src/index.ts: 780-796

issue:
input-controlled growth of globParts during first-phase preprocessing, followed by quadratic second-phase processing.

the **/../ transformation clones a globparts entry and appends the clone to the same globparts array:

parts.splice(gs, 1)
const other = parts.slice(0)
other[gs] = '**'
globParts.push(other)

this occurs inside a do...while (didSomething) fixpoint loop, allowing generated entries to be processed again.

the expanded globparts array is subsequently processed by secondPhasePreProcess(), which performs pairwise comparisons:

for (let i = 0; i < globParts.length - 1; i++) {
for (let j = i + 1; j < globParts.length; j++) {
this.partsMatch(...)
}
}

an attacker who can supply a glob pattern can therefore cause additional pattern entries to be generated during preprocessing, followed by quadratic pairwise processing, resulting in excessive cpu and memory consumption.

warning: Package 'bare-metal@0.2.5' is vulnerable to 'RUSTSEC-2026-0110'.
= RUSTSEC-2026-0110: bare-metal is deprecated
= The `bare-metal` crate has been deprecated and archived.

For `Mutex` and `CriticalSection`, see the [`critical-section`](https://crates.io/crates/critical-section) crate instead.

warning: Package 'bare-metal@0.2.5' is vulnerable to 'RUSTSEC-2026-0110'.
= RUSTSEC-2026-0110: bare-metal is deprecated
= The `bare-metal` crate has been deprecated and archived.

For `Mutex` and `CriticalSection`, see the [`critical-section`](https://crates.io/crates/critical-section) crate instead.

warning: 4 warnings emitted

See detailed reports in MegaLinter artifacts

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

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@10.2.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_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

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-docs:edge ➔ ghcr.io/philips-software/amp-devcontainer-docs:pr-1577

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 233.9 MB 233.9 MB 120 B (0%) 🔽
linux/arm64 228.11 MB 228.11 MB 407 B (0%) 🔽

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-rust:edge ➔ ghcr.io/philips-software/amp-devcontainer-rust:pr-1577

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 483.22 MB 483.22 MB 395 B (0%) 🔽
linux/arm64 422.66 MB 422.66 MB 574 B (0%) 🔽

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-embedded-rust:edge ➔ ghcr.io/philips-software/amp-devcontainer-embedded-rust:pr-1577

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 625.02 MB 549.93 MB 75.09 MB (-12.01%) 🔽
linux/arm64 489.43 MB 489.43 MB 400 B (0%) 🔽

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-cpp:edge ➔ ghcr.io/philips-software/amp-devcontainer-cpp:pr-1577

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 430.38 MB 430.38 MB +1.55 kB (+0%) 🔼
linux/arm64 407.7 MB 407.7 MB +419 B (+0%) 🔼

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-embedded-cpp:edge ➔ ghcr.io/philips-software/amp-devcontainer-embedded-cpp:pr-1577

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 632.59 MB 632.59 MB 1.07 kB (0%) 🔽
linux/arm64 609.1 MB 609.1 MB 193 B (0%) 🔽

Copilot AI deployed to acceptance-testing November 13, 2026 19:07 Active
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

 25 files  ±0   25 suites  ±0   9m 28s ⏱️ -11s
 57 tests ±0   57 ✅ ±0  0 💤 ±0  0 ❌ ±0 
297 runs  ±0  297 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 6f4944a. ± Comparison against base commit 401f439.

♻️ This comment has been updated with latest results.

@sonarqubecloud

Copy link
Copy Markdown

@rjaegers
Ron (rjaegers) deployed to acceptance-testing November 13, 2026 22:29 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
acceptance-testing — 6f4944af Deployed Nov 13, 2026 by rjaegers via Build → Push → Test / 🍨 cpp / 🏗️ / Acceptance Test #2903
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.

container-size-diff prevents first-image bootstrap when the edge baseline does not exist

3 participants