Skip to content

feat(stage1): add azl-bootstrap-hardening macros package#17508

Draft
himaja-kesari wants to merge 1 commit into
4.0from
user/himajakesari/azl4-hardening-flags
Draft

feat(stage1): add azl-bootstrap-hardening macros package#17508
himaja-kesari wants to merge 1 commit into
4.0from
user/himajakesari/azl4-hardening-flags

Conversation

@himaja-kesari
Copy link
Copy Markdown
Contributor

Pilot for distro-wide hardening flag rollout to fix the May 2026 azl4-bootstrap-compliance BinSkim failures (BA3001/BA3003/BA3011).

  • Adds base/comps/azl-bootstrap-hardening/: tiny noarch package that drops macros.azl-bootstrap-hardening into /usr/lib/rpm/macros.d/. Sets %_hardened_build=1 and appends PIE/RELRO/stack-protector flags to %__global_compiler_flags and %__global_ldflags.
  • Wires dracut as a pilot via BuildRequires: azl-bootstrap-hardening (Option B in docs/hardening-flags.md). Per-component build.defines (Option A) is preserved as a commented escape hatch.
  • Documents both approaches and the recommended rollout in docs/hardening-flags.md.

Distro-wide rollout: install the package into stage1+stage2 buildroots via chroot_setup_cmd in distro/mock/azl4/{stage1,stage2}/azurelinux-4.0.tpl (deferred to follow-up change after dracut validation).

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?

Change Log
  • Change
  • Change
  • Change
Does this affect the toolchain?

YES/NO

Associated issues
  • #xxxx
Links to CVEs
Test Methodology
  • Pipeline build id: xxxx

Pilot for distro-wide hardening flag rollout to fix the May 2026
azl4-bootstrap-compliance BinSkim failures (BA3001/BA3003/BA3011).

- Adds base/comps/azl-bootstrap-hardening/: tiny noarch package that
  drops macros.azl-bootstrap-hardening into /usr/lib/rpm/macros.d/.
  Sets %_hardened_build=1 and appends PIE/RELRO/stack-protector flags
  to %__global_compiler_flags and %__global_ldflags.
- Wires dracut as a pilot via BuildRequires: azl-bootstrap-hardening
  (Option B in docs/hardening-flags.md). Per-component build.defines
  (Option A) is preserved as a commented escape hatch.
- Documents both approaches and the recommended rollout in
  docs/hardening-flags.md.

Distro-wide rollout: install the package into stage1+stage2 buildroots
via chroot_setup_cmd in distro/mock/azl4/{stage1,stage2}/azurelinux-4.0.tpl
(deferred to follow-up change after dracut validation).
@github-actions
Copy link
Copy Markdown

🔒❌ Lock files are out of date

FIX: — run this and commit the result:

azldev component update -p azl-bootstrap-hardening -p dracut

Or download the fix patch and apply it:

gh run download 26535501615 -R microsoft/azurelinux -n locks-patch
git apply locks.patch

Changed components (2)

Component New upstream commit
azl-bootstrap-hardening -
dracut 1bf4f641612b0f2f1a20a1993c94ef504ed4beb7

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.

1 participant