Skip to content

fix: enable use-recent-api-versions bicep lint rule#11

Merged
OgeonX-Ai merged 2 commits into
mainfrom
fix/bicep-lint-api-version-pinning
Jul 8, 2026
Merged

fix: enable use-recent-api-versions bicep lint rule#11
OgeonX-Ai merged 2 commits into
mainfrom
fix/bicep-lint-api-version-pinning

Conversation

@OgeonX-Ai

Copy link
Copy Markdown
Contributor

Summary

  • Closes out the remaining P2 hardening item from Phase 33 (Azure infra hardening): the use-recent-api-versions Bicep lint rule was present in bicepconfig.json but forced to off, so the linting story it implied was only half-real.
  • Flips use-recent-api-versions from off to warning (not error, since this repo has no CI gate yet to enforce a hard failure without a rollback path).
  • Verified the P1 fix (observability publicNetworkAccess parameterization, merged in fix: secure observability public network access by default #7) is intact and unmodified on this branch — no changes were needed there.
  • Re-ran az bicep lint --diagnostics-format sarif against every module (main.bicep, observability.bicep, container-apps.bicep, foundry-rbac.bicep, budget.bicep) with the rule enabled: zero use-recent-api-versions findings. Every currently pinned API version is inside the linter's freshness window.
  • The pre-existing #disable-next-line use-recent-api-versions suppression above the Microsoft.Insights/diagnosticSettings@2021-05-01-preview resource in container-apps.bicep remains in place — it is now load-bearing rather than a no-op, and no newer non-preview API version was confirmed available to swap it out safely (a swap would be deployment-affecting and out of scope for this local-validation-only plan).
  • Added infra/main.json to .gitignoreaz bicep build was emitting this compiled ARM template as an untracked file with no repo config to suppress it.

Test plan

  • az bicep build --file infra/main.bicep exits 0
  • az bicep lint --file infra/main.bicep exits 0, no warnings/errors
  • az bicep lint --diagnostics-format sarif against all 5 module files: zero use-recent-api-versions findings
  • python -c "import json; json.load(open('bicepconfig.json'))" — valid JSON
  • git diff origin/main -- infra/modules/observability.bicep infra/main.bicep infra/parameters/ — empty (P1 unaffected)
  • ./scripts/validate.ps1 per CONTRIBUTING.md — this script does not exist in the repo today (only scripts/what-if.ps1); out of scope for this plan per phase constraints (local Bicep build/lint validation only, no az deployment/what-if run)

No az deployment command of any kind was run. Not merging — opening for review per phase constraints.

🤖 Generated with Claude Code

Aitomates added 2 commits July 6, 2026 20:06
- Change use-recent-api-versions from off to warning in bicepconfig.json
- Warning (not error) avoids a first-time hard-fail surface since there is
  no CI gate yet to enforce it
- az bicep build --file infra/main.bicep emits a compiled ARM template
  that was previously untracked; ignore it as generated build output
@OgeonX-Ai OgeonX-Ai enabled auto-merge (squash) July 8, 2026 17:03
@OgeonX-Ai OgeonX-Ai merged commit b5be815 into main Jul 8, 2026
4 checks passed
@OgeonX-Ai OgeonX-Ai deleted the fix/bicep-lint-api-version-pinning branch July 8, 2026 17:53
OgeonX-Ai added a commit that referenced this pull request Jul 8, 2026
…13)

- README: document bicepconfig.json lint rules and the in-progress (PR #11)
  use-recent-api-versions rule; state the bicep-ready/NO-AZURE-deploy-lock posture; freshness footer
- wiki: Home, Architecture (module graph + explicit deploy-lock statement), Operations, Decisions
- Adds codex:generate-image placeholder per docs/VISION.md house style

Co-authored-by: Kim Harjamäki <kim.harjamaki@prosimo.fi>
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.

2 participants