Skip to content

fix(security): judge Trivy-config AZU-0041 in tf/azure/main.tf #4945

Closed

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: AZU-0041
  • Path: tf/azure/main.tf
  • Severity: CRITICAL

Open alerts:

Judge it under "Judging a Trivy-config Alert" in SECURITY.md: fix the file, dismiss the alert with a reason, or add a time-limited entry to .trivyignore.yaml. The owner judges a CRITICAL alert within 24 hours. An agent judges any other alert within 14 days.

Constraint (owner decision, 2026-11-12): clear AZU-0041 with api_server_access_profile.authorized_ip_ranges in tf/azure/main.tf from a new variable that has no default. The endpoint stays public, and no address goes into git. A network policy is AZU-0043 (#4949), not this item.

Proposed design

Problem statement

Trivy config reports AZU-0041 at tf/azure/main.tf with CRITICAL severity. Alert 213 stays open. The azurerm_kubernetes_cluster.aks resource sets no API server authorized IP ranges. The change sets api_server_access_profile.authorized_ip_ranges from a new variable that has no default. The API server endpoint stays public, and no address goes into git. The network policy rule AZU-0043 stays with item dan-petty/infra#182.

Acceptance criteria

Requirement: API server authorized IP ranges

The AKS cluster SHALL set api_server_access_profile.authorized_ip_ranges from the new variable var.api_server_authorized_ip_ranges.

Scenario: Authorized ranges come from the variable

  • WHEN A test reads the azurerm_kubernetes_cluster.aks resource in tf/azure/main.tf
  • THEN The resource has one api_server_access_profile block, and its authorized_ip_ranges is var.api_server_authorized_ip_ranges.

Requirement: Variable without a default

The new variable api_server_authorized_ip_ranges SHALL have no default value.

Scenario: The variable block has no default

  • WHEN A test reads the api_server_authorized_ip_ranges block in tf/azure/variables.tf
  • THEN The block has type = list(string), a description, and no default argument.

Requirement: No allowlist address in git

The committed Terraform files SHALL hold no API server allowlist address.

Scenario: Committed Terraform holds no allowlist address

  • WHEN A test reads tf/azure/main.tf and tf/azure/variables.tf
  • THEN The only value of authorized_ip_ranges is the variable reference, and neither file holds a CIDR literal for the allowlist.

Requirement: Terraform configuration validates

The Terraform configuration SHALL pass tofu validate after the change.

Scenario: Validation passes

  • WHEN tofu init -backend=false and tofu validate run in tf/azure
  • THEN Both commands exit with status 0.

Requirement: AZU-0041 is cleared

The Terraform configuration SHALL produce no AZU-0041 result for tf/azure/main.tf.

Scenario: Trivy config scan reports no AZU-0041

  • WHEN trivy config tf/azure runs on the changed tree
  • THEN The output holds no AZU-0041 result for tf/azure/main.tf.

Requirement: Network profile unchanged

The change SHALL leave the network_profile block of azurerm_kubernetes_cluster.aks unchanged.

Scenario: The network profile keeps its four arguments

  • WHEN A test reads the network_profile block in tf/azure/main.tf
  • THEN The block holds only network_plugin = "azure", load_balancer_sku = "standard", service_cidr = "10.0.0.0/16" and dns_service_ip = "10.0.0.10".

Existing Tool Considered

No alternatives check has run. The open, maintained AzureRM Terraform provider (hashicorp/azurerm) supplies api_server_access_profile.authorized_ip_ranges. It lacks no capability for this change. The change builds no code of its own, so the build cost is 0 tokens and 0 minutes.

Key questions

  • Which rule does alert 213 report, and what does it require?: Alert 213 reports AZU-0041 at CRITICAL severity on tf/azure/main.tf. The rule requires API server authorized IP ranges on the AKS cluster. The azurerm_kubernetes_cluster.aks resource sets no api_server_access_profile block. [sources: tf/azure/main.tf]
  • How should the CRITICAL AZU-0041 alert be judged?: Fix the file in a pull request that closes the issue. Add no .trivyignore.yaml entry and dismiss no alert. (best practice) [sources: SECURITY.md]
    • Chosen: Fix the file. SECURITY.md makes the fix the first choice, and the owner chose this fix on 2026-11-12.
    • Rejected: Add a .trivyignore.yaml entry. SECURITY.md forbids an agent to ignore a CRITICAL alert, and an entry is for a fix that a workload break blocks.
    • Rejected: Dismiss the alert in code scanning. SECURITY.md says only a person dismisses an alert, and an agent does not.
  • Which Terraform argument clears AZU-0041?: Set api_server_access_profile { authorized_ip_ranges = var.api_server_authorized_ip_ranges } on azurerm_kubernetes_cluster.aks. The endpoint stays public. (best practice) [sources: tf/azure/main.tf]
    • Chosen: api_server_access_profile.authorized_ip_ranges from the variable. The owner chose it on 2026-11-12, and the AzureRM provider supplies the argument.
    • Rejected: A private cluster. Only the VNet would reach the API server, and the owner keeps the endpoint public.
    • Rejected: network_policy = "azure" in network_profile. That argument is the network policy rule AZU-0043, which item fix(security): judge Trivy-config AZU-0043 in tf/azure/main.tf infra#182 owns, and it leaves AZU-0041 open.
    • Rejected: A .trivyignore.yaml entry. SECURITY.md forbids an agent to ignore a CRITICAL alert, and a fix exists.
  • Where does the new variable go, and does it have a default?: Declare api_server_authorized_ip_ranges in tf/azure/variables.tf beside the other module variables. Give it type = list(string), a description, and no default. A person gives the ranges when they apply the module. (best practice) [sources: tf/azure/variables.tf, SECURITY.md]
    • Chosen: Variable in tf/azure/variables.tf with no default. The owner decision of 2026-11-12 requires no default, so no address goes into git and the apply stops until a person gives the ranges.
    • Rejected: Variable with an RFC 5737 default. A default would apply a placeholder allowlist and would put an address into a committed file.
    • Rejected: A literal list in tf/azure/main.tf. SECURITY.md rule 8 forbids a committed address, and the owner requires a variable.
  • Does this change set the AKS network policy?: No. AZU-0043 is the network policy rule and item fix(security): judge Trivy-config AZU-0043 in tf/azure/main.tf infra#182 owns it. The change leaves the network_profile block unchanged. (best practice) [sources: tf/azure/main.tf, SECURITY.md]
  • Which address values may a test or a document use?: Use RFC 5737 blocks only: 192.0.2.0/24, 198.51.100.0/24 or 203.0.113.0/24. A committed file holds no such address for this change. A test that needs a value uses an RFC 5737 range. [sources: SECURITY.md, tests/invariants/test_committed_addresses.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/security
    on Nov 12, 2026
  2. added
    status/new
    value/high
    effort/low
    on Nov 12, 2026
  3. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Priority: P1-High. The alert is CRITICAL, and the owner must judge it within 24 hours.
    • Value: High. A CRITICAL misconfiguration in the Azure Terraform file can expose the deployment to attack.
    • Effort: Low. The work is one alert in one file, with a fix, a dismissal or an ignore entry as the outcome.
    • Related: fix(security): judge the 52 open Trivy-config alerts #4409, which asks for a different change. Both items judge Trivy-config alerts in the same files, but item 4409 judges all 52 open alerts and the candidate judges only AZU-0041.
  4. added
    priority/p1-high
    status/ready
    and removed
    status/new
    on Nov 12, 2026
  5. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 87ae9ee (see proposed design in issue body).

  6. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Staged: branch fix/4945-judge-trivy-config-azu-0041-in, draft pull request #5053. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:

    1. Set the Azure network policy on the AKS cluster and assert it with an invariant test: 21819 tokens
    2. Document the AKS network policy and the OpenTofu validation step of the module: 7698 tokens

    A model review of the plan found these open findings. The stage keeps this pull request a draft with the label plan/needs-fix until a later round clears them:

    • task_order at group 1: The group writes the code change before the test that asserts it, so the new invariant test never fails on the base and the group is not written test first. Evidence: "Add network_policy = "azure" to the network_profile block of the AKS cluster resource in tf/azure/main.tf, beside network_plugin = "azure". Write tests/invariants/test_azure_aks_network_policy.py"
    • false_premise at decisions: The plan claims no group runs the OpenTofu command, but group 2's process runs tofu init -backend=false and tofu validate on tf/azure, so the reason for dropping the validation requirement is false. Evidence: "so no group runs the command and no offline test can assert it"

    A model review of the plan found these points. They stop no draft, and a person judges them:

    • ignores_existing_code at group 1: The new invariant test hand-rolls an HCL block reader with brace matching, while the project already ships an in-process HCL parser: src/devops_cli/tf/analysis.py (parse_hcl_directory, on the pinned python-hcl2 dependency) parses tf/azure and returns azurerm_kubernetes_cluster.aks with its network_profile attributes. Evidence: "finds the network_profile block of the AKS cluster by its braces"
    • false_premise at security: The plan claims the Security Scan step fails when AZU-0041 returns, but that step runs devops scan report with no --fail-on, and gate_report passes every report when no threshold is set, so the step only uploads SARIF and exits 0. Evidence: "the Security Scan step of the pull request fails if AZU-0041 returns for the file"
    • criterion_dropped at specs: The issue's requirement "Terraform configuration validates" has no task: the only group's verify runs pytest, and the plan leaves the tofu validate run to a person. Evidence: "The Terraform configuration SHALL pass tofu validate after the change."
    • spec_delta_wrong at specs (the "Terraform configuration validates" requirement): The delta adds a requirement whose only scenario runs a real tofu validate on a host with OpenTofu, so no offline test can assert it; the plan's own decision says the runner image holds no tofu and no group runs the command. Evidence: "tofu validate runs in the Azure module directory on a host with OpenTofu"
    • missing_path at group 1: Group 1 writes the directory tf/azure in a code span of its task, and the commit holds no file at that path; the project's path check reads a name with a folder as a repository path and refuses one that is no file, so the plan names a path that exists only as a directory. Evidence: "it parses the directory tf/azure with parse_hcl_directory"
    • false_premise at feasibility: The plan says tofu is in NOT_IN_RUNNER, but the table in src/devops_cli/roadmap/runner_tools.py names trivy, tflint and the other missing programs and holds no entry for tofu, so the plan misstates where the missing program is recorded. Evidence: "trivy and tofu are NOT_IN_RUNNER, so no group runs the IaC scan or the validation"
    • other at decisions: The plan has an agent judge a CRITICAL alert and choose the fix, while SECURITY.md and the issue reserve the judgment of a CRITICAL alert to the owner within 24 hours; the plan should leave it to the owner instead of deciding it. Evidence: "The owner judges a CRITICAL alert within 24 hours. An agent judges an alert of severity HIGH, MEDIUM or LOW within 14 days."

    The runs of the planner and the review made 121 model request(s), and used 7220084 input tokens and 216929 output tokens. The tool calls, in order:

    1. list_files({"directory":""})
    2. search_code({"text":"tf/azure"})
    3. search_code({"text":"azurerm_kubernetes_cluster"})
    4. read_spec({"capability":"trivy-config-alerts"})
    5. search_code({"text":"main.tf"})
    6. list_files({"directory":"tf/azure"})
    7. read_file({"path":"tf/README.md"})
    8. find_issues({"terms":"AZU-0041 network policy"})
    9. list_files({"directory":"tests/invariants"})
    10. search_code({"text":"tf/aws/main.tf"})
    11. read_file({"path":"tf/azure/main.tf","start_line":60,"end_line":90})
    12. search_code({"text":"Judging a Trivy-config Alert"})
    13. search_code({"text":"trivy config"})
    14. read_spec({"capability":"tf-lint"})
    15. search_code({"text":"Security Scan"})
    16. search_code({"text":"tofu validate"})
    17. read_file({"path":"SECURITY.md","start_line":78,"end_line":98})
    18. read_file({"path":".github/workflows/ci.yml","start_line":60,"end_line":105})
    19. read_file({"path":"tests/invariants/test_committed_addresses.py","start_line":1,"end_line":40})
    20. read_file({"path":"tests/support/paths.py","start_line":1,"end_line":45})
    21. search_code({"text":"test_azure"})
    22. search_code({"text":"def detect_language"})
    23. search_code({"text":"devops ci test"})
    24. search_code({"text":"AZU-"})
    25. read_file({"path":"tf/azure/main.tf","start_line":60,"end_line":78})
    26. list_files({"directory":"tf"})
    27. read_file({"path":"SECURITY.md","start_line":70,"end_line":100})
    28. search_code({"text":"tf/azure"})
    29. read_file({"end_line":110,"path":".github/workflows/ci.yml","start_line":70})
    30. read_file({"end_line":75,"path":"tf/README.md","start_line":45})
    31. search_code({"text":"tofu validate"})
    32. list_files({"directory":"tests/invariants"})
    33. list_files({"directory":""})
    34. search_code({"text":"network_policy"})
    35. read_spec({})
    36. search_code({"text":"hcl2"})
    37. read_file({"path":"src/devops_cli/tf/analysis.py","start_line":1,"end_line":140})
    38. read_spec({"capability":"terraform-state-drift"})
    39. search_code({"text":"main.tf"})
    40. file_symbols({"path":"src/devops_cli/tf/analysis.py"})
    41. list_files({"directory":"openspec/specs"})
    42. search_code({"text":"trivy-config"})
    43. search_code({"text":"NOT_IN_RUNNER"})
    44. search_code({"text":"def report("})
    45. search_code({"text":"scan report"})
    46. search_code({"text":"tofu"})
    47. search_code({"text":"def report"})
    48. list_files({"directory":"src/devops_cli/commands/scan"})
    49. search_code({"text":"sarif"})
    50. search_code({"text":"exit_code"})
    51. list_files({"directory":"src/devops_cli/commands"})
    52. file_symbols({"path":"src/devops_cli/commands/scan.py"})
    53. read_file({"path":"src/devops_cli/commands/scan.py","start_line":986,"end_line":1068})
    54. read_file({"path":"src/devops_cli/commands/scan.py","start_line":796,"end_line":820})
    55. search_code({"text":"def gate_report"})
    56. read_file({"end_line":275,"path":"src/devops_cli/security/pipeline.py","start_line":221})
    57. read_file({"end_line":235,"path":"src/devops_cli/tf/analysis.py","start_line":180})
    58. search_code({"text":"parse_hcl_directory"})
    59. search_code({"text":"class IaCResource"})
    60. read_file({"end_line":180,"path":"src/devops_cli/tf/analysis.py","start_line":140})
    61. read_issue({"number":4945})
    62. find_issues({"terms":"AZU-0041 network policy"})
    63. read_issue({"number":4409})
    64. file_symbols({"path":"src/devops_cli/commands/ci.py"})
    65. search_code({"text":"AZU-0041"})
    66. read_spec({"capability":"trivy-config-alerts"})
    67. read_file({"end_line":70,"path":".github/workflows/ci.yml","start_line":40})
    68. search_code({"text":"fail-on"})
    69. read_file({"end_line":1918,"path":"src/devops_cli/commands/ci.py","start_line":1866})
    70. read_file({"end_line":1805,"path":"src/devops_cli/commands/ci.py","start_line":1759})
    71. read_file({"end_line":1705,"path":"src/devops_cli/commands/ci.py","start_line":1660})
    72. read_file({"end_line":1660,"path":"src/devops_cli/commands/ci.py","start_line":1596})
    73. search_code({"text":"\"tf\""})
    74. search_code({"text":"tf/aws"})
    75. file_symbols({"path":"src/devops_cli/tf/analysis.py"})
    76. search_code({"text":"parse_hcl_directory"})
    77. search_code({"text":"tofu validate"})
    78. list_files({"directory":"tests/invariants"})
    79. read_file({"path":"src/devops_cli/tf/analysis.py","start_line":1,"end_line":62})
    80. read_file({"path":"src/devops_cli/tf/analysis.py","start_line":180,"end_line":235})
    81. file_symbols({"path":"src/devops_cli/models/tf.py"})
    82. read_file({"path":"src/devops_cli/tf/analysis.py","start_line":125,"end_line":180})
    83. read_file({"path":"src/devops_cli/models/tf.py","start_line":155,"end_line":202})
    84. read_file({"path":"src/devops_cli/tf/analysis.py","start_line":62,"end_line":100})
    85. search_code({"text":"Security Scan"})
    86. search_code({"text":"gate_report"})
    87. read_file({"end_line":100,"path":".github/workflows/ci.yml","start_line":62})
    88. read_file({"end_line":250,"path":"src/devops_cli/security/pipeline.py","start_line":221})
    89. read_file({"end_line":80,"path":"tf/README.md","start_line":1})
    90. read_file({"end_line":45,"path":"tests/support/paths.py","start_line":1})
    91. search_code({"text":"tf/azure"})
    92. find_issues({"terms":"AZU-0041 network policy"})
    93. read_file({"path":"SECURITY.md","start_line":80,"end_line":96})
    94. read_file({"path":"tf/azure/main.tf","start_line":60,"end_line":80})
    95. search_code({"text":"The owner judges a CRITICAL alert within 24 hours"})
    96. read_file({"path":"SECURITY.md","start_line":84,"end_line":92})
    97. list_files({"directory":"tests/invariants"})
    98. read_spec({})
    99. read_file({"path":"SECURITY.md","start_line":70,"end_line":100})
    100. read_file({"path":"tf/azure/main.tf","start_line":55,"end_line":85})
    101. search_code({"text":"trivyignore"})
    102. search_code({"text":"ci test"})
    103. search_code({"text":"tofu"})
    104. search_code({"text":"tf/azure"})
    105. search_code({"text":"NOT_IN_RUNNER"})
    106. search_code({"text":"parse_hcl_directory"})
    107. search_code({"text":"network_plugin"})
    108. search_code({"text":"\"tf\""})
    109. search_code({"text":"\"tofu\""})
    110. read_file({"path":"src/devops_cli/roadmap/runner_tools.py","start_line":1,"end_line":80})
    111. search_code({"text":"NotInRunner"})
    112. read_file({"end_line":200,"path":"src/devops_cli/roadmap/runner_tools.py","start_line":80})
    113. read_file({"end_line":280,"path":"src/devops_cli/roadmap/runner_tools.py","start_line":200})
    114. read_file({"end_line":240,"path":"src/devops_cli/tf/analysis.py","start_line":180})
    115. read_spec({"capability":"azure-aks-module"})
    116. read_file({"end_line":60,"path":"src/devops_cli/models/tf.py","start_line":1})
    117. search_code({"text":"class IaCResource"})
    118. read_file({"end_line":230,"path":"src/devops_cli/models/tf.py","start_line":150})
    119. list_files({"directory":"openspec/specs"})
    120. read_file({"end_line":95,"path":".github/workflows/ci.yml","start_line":70})
    121. read_file({"end_line":245,"path":"src/devops_cli/security/pipeline.py","start_line":215})
    122. read_spec({"capability":"roadmap-plan-check"})
    123. read_spec({"capability":"roadmap-plan-check","requirement":"The reader judges every verification command"})
    124. read_spec({"capability":"roadmap-plan-check","requirement":"The plan reader reports a criterion that the model refuses"})
    125. search_code({"text":"terraform"})
    126. list_files({"directory":"tf/azure"})
    127. read_file({"end_line":120,"path":"Dockerfile","start_line":75})
    128. repo_map({"directory":"src/devops_cli/tf"})
    129. search_code({"text":"network_policy"})
    130. search_code({"text":"tofu validate"})
    131. list_files({"directory":""})
    132. read_issue({"number":4945})
    133. find_issues({"terms":"AZU-0041 network policy"})
    134. read_file({"end_line":900,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":820})
    135. read_file({"end_line":1010,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":897})
    136. read_spec({"capability":"roadmap-plan-check","requirement":"The plan reader keeps the document work of a group"})
    137. read_spec({"capability":"roadmap-stage","requirement":"A group of the plan holds its verification"})
    138. read_spec({"capability":"roadmap-stage"})
    139. read_spec({"capability":"roadmap-stage","requirement":"Criteria mapping in the stage reply"})
    140. read_spec({"capability":"roadmap-stage","requirement":"An unmapped criterion is refused"})
    141. read_spec({"capability":"roadmap-stage","requirement":"Criteria section in tasks.md"})
    142. read_spec({"capability":"roadmap-stage","requirement":"A new test module sits in a mirror directory"})
    143. read_spec({"capability":"roadmap-stage","requirement":"A verify command has the project form"})
    144. search_code({"text":"AKS"})
    145. search_code({"text":"azurerm"})
    146. search_code({"text":"process"})
    147. read_file({"end_line":120,"path":"tf/README.md","start_line":55})
    148. read_file({"end_line":40,"path":"tf/azure/versions.tf","start_line":1})
    149. search_code({"text":"no verify"})
    150. search_code({"text":"group_problem"})
    151. read_file({"end_line":4370,"path":"src/devops_cli/lang/en/messages.py","start_line":4290})
    152. search_code({"text":"first"})
    153. search_code({"text":"kind other"})
    154. read_file({"end_line":80,"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":1})
    155. read_file({"end_line":130,"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":24})
    156. read_file({"end_line":200,"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":37})
    157. search_code({"text":"tofu"})
    158. read_spec({"capability":"tf-lint"})
    159. search_code({"text":"NOT_IN_RUNNER"})
    160. file_symbols({"path":"src/devops_cli/tf/analysis.py"})
    161. search_code({"text":"NOT_IN_RUNNER: dict"})
    162. list_files({"directory":"tests/support"})
    163. read_file({"path":"src/devops_cli/roadmap/runner_tools.py","start_line":180,"end_line":250})
    164. read_file({"path":"tests/support/paths.py","start_line":1,"end_line":40})
    165. list_files({"directory":"tests/tf"})
    166. search_code({"text":"parse_hcl_directory("})
    167. read_file({"path":"SECURITY.md","start_line":78,"end_line":95})
    168. search_code({"text":"AZU-0041"})
    169. find_issues({"terms":"AZU-0041 network policy"})
    170. search_code({"text":"scan report --sarif"})
    171. read_file({"path":"src/devops_cli/security/pipeline.py","start_line":224,"end_line":236})
    172. list_files({"directory":"tests"})
    173. list_files({"directory":"tf/azure"})
    174. list_files({"directory":""})
    175. list_files({"directory":"tests/invariants"})
    176. search_code({"text":"ci test"})
    177. read_file({"path":"src/devops_cli/roadmap/runner_tools.py","start_line":180,"end_line":240})
    178. read_file({"path":"SECURITY.md","start_line":70,"end_line":105})
    179. read_file({"path":".github/workflows/ci.yml","start_line":70,"end_line":110})
    180. read_spec({})
    181. search_code({"text":"tf/azure"})
    182. search_code({"text":"network_policy"})
    183. read_file({"path":"src/devops_cli/tf/analysis.py","start_line":186,"end_line":260})
    184. search_code({"text":"hcl2"})
    185. search_code({"text":"tf/aws"})
    186. search_code({"text":"tofu validate"})
    187. search_code({"text":"tofu fmt"})
    188. search_code({"text":"def test("})
    189. list_files({"directory":"src/devops_cli/commands/ci"})
    190. read_file({"path":"src/devops_cli/commands/ci.py","start_line":1866,"end_line":1990})
    191. search_code({"text":"fmt"})
    192. search_code({"text":"def _resolve_test_targets"})
    193. read_file({"path":"tests/invariants/test_source_tree.py","start_line":1,"end_line":40})
    194. read_file({"end_line":1865,"path":"src/devops_cli/commands/ci.py","start_line":1759})
    195. read_file({"end_line":250,"path":"src/devops_cli/security/pipeline.py","start_line":200})
    196. search_code({"text":"fail_on"})
    197. search_code({"text":"NOT_IN_RUNNER"})
    198. search_code({"text":"tofu"})
    199. read_file({"path":"src/devops_cli/roadmap/runner_tools.py","start_line":1,"end_line":180})
    200. list_files({"directory":"tests/tf"})
    201. read_file({"path":"tf/azure/versions.tf"})
    202. read_file({"path":"tf/azure/variables.tf","start_line":1,"end_line":40})
    203. read_file({"end_line":2470,"path":"src/devops_cli/config/constants.py","start_line":2440})
    204. search_code({"text":"__is_block__"})
    205. search_code({"text":"def _map_changed_paths"})
    206. search_code({"text":"def select_tests"})
    207. read_file({"end_line":1758,"path":"src/devops_cli/commands/ci.py","start_line":1660})
    208. search_code({"text":"weakened_checks"})
    209. search_code({"text":"creates_lines"})
    210. read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":1,"end_line":80})
    211. read_file({"end_line":60,"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":23})
    212. read_file({"end_line":80,"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":36})
    213. search_code({"text":"def _map_test_tree_path"})
    214. read_file({"end_line":1660,"path":"src/devops_cli/commands/ci.py","start_line":1560})
    215. read_file({"end_line":495,"path":"src/devops_cli/commands/tf.py","start_line":480})
    216. read_file({"end_line":130,"path":"tests/tf/test_tf_analysis.py","start_line":118})
    217. read_file({"end_line":40,"path":"tests/invariants/test_hermetic_floor.py","start_line":1})
    218. read_file({"end_line":40,"path":"tests/invariants/test_committed_addresses.py","start_line":1})
    219. read_file({"end_line":90,"path":".github/workflows/ci.yml","start_line":1})
    220. search_code({"text":"attributes.get("})
    221. search_code({"text":"attributes["})
    222. list_files({"directory":"openspec/specs"})
    223. read_spec({"capability":"k8s-network-policies"})
    224. read_spec({"capability":"terraform-state-drift"})
    225. search_code({"text":"tf/"})
    226. read_file({"end_line":80,"path":"src/devops_cli/research/terraform_pins.py","start_line":1})
    227. search_code({"text":"def check_proposal"})
    228. search_code({"text":"criterion"})
    229. search_code({"text":"def criteria_problems"})
    230. search_code({"text":"Acceptance criteria"})
    231. search_code({"text":"def report("})
    232. read_file({"end_line":1080,"path":"src/devops_cli/commands/scan.py","start_line":990})

    Tool calls: file_symbols=6 (empty=0), find_issues=5 (empty=0), list_files=23 (empty=0), read_file=80 (empty=0), read_issue=3 (empty=0), read_spec=22 (empty=0), repo_map=1 (empty=0), search_code=92 (empty=3)

    The stage job read the open pull requests and their files in 1 GraphQL request(s).

  7. added a commit that references this issue on Nov 12, 2026
  8. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    The step fix-plan pushed a revision of the plan of #5053 (3b7b21a). The model review found 2 open finding(s) in the plan before the repair and 1 after it, so the pull request keeps the label plan/needs-fix.

    A model review of the plan found these open findings. The stage keeps this pull request a draft with the label plan/needs-fix until a later round clears them:

    • task_order at group 2: Group 2 records the Trivy config result in tf/README.md before it runs the scan, so the recorded result depends on a later step of the same group; the plan's own feasibility says the group runs the scan first and then records the result. Evidence: "and to record that the Trivy config scan of tf/azure reports no AZU-0041 result for tf/azure/main.tf. Then run the two OpenTofu commands and the pinned Trivy's config scan on the module folder, and confirm the three results"
  9. dan-petty commented on Nov 12, 2026

    @dan-petty
    Owner

    Owner decision for alert 213 (2026-11-12)

    The owner chose option (b): set api_server_access_profile.authorized_ip_ranges on the AKS cluster in tf/azure/main.tf from a new variable that has no default. An agent posts this decision for the owner.

    Reason. This change clears AZU-0041, and the API server endpoint stays public. The allowed ranges come from the variable when a person applies the module, so no address goes into git (AGENTS.md rule 10). Option (a), a private cluster, also clears AZU-0065, but then only the VNet can reach the API server.

    Evidence.

    • Alert 213 is AZU-0041 "Ensure AKS has an API Server Authorized IP Ranges enabled", severity critical, path tf/azure/main.tf.
    • Alert 222 is AZU-0043 "Ensure AKS cluster has Network Policy configured", severity high. Item fix(security): judge Trivy-config AZU-0043 in tf/azure/main.tf infra#182 owns it.
    • The plan of docs(openspec): plan #4945 Set the AKS network policy to the Azure engine #5053 sets network_policy = "azure". That change clears only AZU-0043. A local Trivy 0.75.0 config scan of tf/azure on main gives AZU-0041 and AZU-0043. With the change of the plan, AZU-0041 (critical) stays and AZU-0043 goes. With api_server_access_profile { authorized_ip_ranges = ["198.51.100.0/24"] } (an RFC 5737 range), AZU-0041 goes.
    • The refine design of this item says "The AKS cluster in that file sets no network policy". That is the premise of AZU-0043, not of AZU-0041.

    Next. #5053 closes with no merge. This item goes back to New, so that refine writes the design again and the stage job plans the chosen fix. SECURITY.md: the owner judges a CRITICAL alert within 24 hours; this item was filed at 06:16Z on 12 Nov.

  10. dan-petty commented on Nov 12, 2026

    @dan-petty
    Owner

    Returned to New for a new design and plan.

    The refine design of this item clears the wrong rule. It sets a network policy, and that is AZU-0043 (alert 222, item dan-petty/infra#182). Alert 213 is AZU-0041, API server authorized IP ranges. Plan PR #5053 is closed with no merge for this reason.

    The owner chose the fix on 2026-11-12 (option b): add api_server_access_profile { authorized_ip_ranges = var.<name> } to the AKS cluster in tf/azure/main.tf, with a new variable that has no default. The endpoint stays public, and no address goes into git. A test or a document uses RFC 5737 addresses only. A local Trivy 0.75.0 config scan of tf/azure clears AZU-0041 with this block. The time limit is near 06:16Z on 13 Nov (SECURITY.md: the owner judges a CRITICAL alert within 24 hours).

  11. added
    status/new
    and removed
    status/ready
    on Nov 12, 2026
  12. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Plan pull request #5053 closed with no merge. The job waits for an edit of the text of this item, or for a commit that changes a file that the reason names.

    The reason, from the last comment of dan-petty on the pull request:

    Closed with no merge: this plan clears the wrong rule.

    Alert 213 is AZU-0041 "Ensure AKS has an API Server Authorized IP Ranges enabled" (critical). The plan sets network_policy = "azure" in tf/azure/main.tf. That change clears AZU-0043 (alert 222, item dan-petty/infra#182) and leaves alert 213 open. A local Trivy 0.75.0 config scan of tf/azure confirms this: with the change of the plan, AZU-0041 stays and AZU-0043 goes. The record of task 2.1 in tf/README.md ("the scan reports no AZU-0041 result") would be false.

    The owner chose the fix on 2026-11-12 (see #4945): api_server_access_profile.authorized_ip_ranges from a variable with no default. The new plan must set that block. The network policy design of this plan belongs to dan-petty/infra#182 (AZU-0043), and refine of dan-petty/infra#182 can use it again.

  13. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 15, 2026
  14. added a commit that references this issue on Nov 15, 2026
    db9624d
  15. added
    status/in-review
    and removed
    status/in-progress
    on Nov 15, 2026
  16. removed
    status/in-review
    owner/agent
    on Nov 15, 2026
  17. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor
  18. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 01:03 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/securitytype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions