Repository navigation
Conversation
…oks where it is not; advisories only where they apply A pending action is named for what it means on its ARN, and one database's actions are one ordered set of rows. An advisory is attached only when it ties to the action (service, engine, version range, kind of action, date); an action AWS publishes with no CVE list gets none. RDS and ElastiCache reads follow every page. The code that defines a resource is found across every connected repository and layout: CloudFormation, CDK, SAM and Serverless Framework by stack name and logical id (tags, or DescribeStackResources by physical id), Terraform and OpenTofu by resource type and attributes through module calls and variable files. Each location says how it was found and how sure it is; a low-confidence one never becomes a pull request. An update with a code equivalent is a pull request on the line that sets the value, with the rollout notes for its tool; one that cannot be expressed in code stays a runbook and says so. A runbook is complete. A change that would replace or destroy a data resource is refused. The facts come from a guidance store with a source and a review date on every entry. Adds cloudformation:DescribeStackResources to the optional Infrastructure vulnerabilities read permissions.
…ound, then a draft with the reason and the runbook The pull request is never closed and its branch is never deleted. On the first trip one fix round is told each offending file and line and must produce the in-place change; the guard reads the result again. If it still trips, the pull request becomes a draft with the reason and the lines at the top of its description, which holds it from being marked ready or merged, and the finding falls back to its runbook. No further attempt starts by itself until the finding's code or target changes.
nambok
force-pushed
the
infra-senior-engineer
branch
from
November 13, 2026 17:53
05b98af to
71b36b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Security, Infrastructure now works like an infrastructure engineer on a database, cache or search update: an update that has a code equivalent becomes a pull request against the line that sets the value, when the code that defines the resource is found for sure; an update that cannot be expressed in code, or whose code is not found, becomes a complete runbook that says why it is one.
Before this change every RDS, Aurora, ElastiCache and OpenSearch finding was a one-command runbook with no location, whatever defined the resource. The same CVE was shown on an operating system update, an Aurora PostgreSQL patch and a MySQL upgrade. A resource with a Terraform-generated identifier, or one defined through a module, was never found in code. Two actions on one cluster were unrelated rows and a second instance's action was dropped. RDS was read one page deep.
Changes
Correct findings (
common/src/infra_vuln/actions.rs,raw.rs,matching.rs,feeds.rs)system-updateon an Aurora cluster ARN is an Aurora PostgreSQL engine patch, on an instance ARN an operating system update;os-upgradeanddb-upgradeare read too. An action AWS does not document for an ARN is shown under AWS's own name with no meaning made up.Finding the code (
locate.rs,terraform.rs,hcl.rs,stacks.rs,worker/src/passes/infra_inventory.rs,infra_repo.rs)DescribeStackResourcesby physical id where tags are missing, matched to the template that defines the logical id or the CDK construct the id was built from..tfvarsline, a variable default.for_each,countand shared values are said so.tool_of), so CDK next to application code, templates at neutral paths,serverless.ymland Pulumi programs count.is_iac_pathis widened andis_iac(path, content)added.Pull request or runbook (
matching.rs,records.rs,guard.rs,worker/src/passes/infra_findings.rs)ready.rs, so the pull request is never marked ready, and a draft is never merged. Every rebuild of the description keeps the section.Runbooks and guidance (
runbook.rs,guidance.rs,guidance/*.json)AWS read permission
cloudformation:DescribeStackResourcesis added to the optional "Infrastructure vulnerabilities" ability (both access templates,log_reader.rs,iam_resource_types.json). It returns stack names and logical ids only. A role that does not have it yet is noted once on the read with the permission's name, and resources are placed by tags and code alone.Shared files touched:
services/worker/src/clients/github.rs(addsconvert_pr_to_draft),services/worker/src/passes/ready.rs(one hold inbody_holds_on),infra/cfn/coderhelm-log-reader.yaml,infra/cfn/coderhelm-log-reader-update.yaml,services/common/src/log_reader.rs,services/common/src/live/iam_resource_types.json,services/worker/src/passes/incidents/mod.rs,docs/incidents.md.Where a pull request description is written: one call,
update_pr_bodyininfra_findings::draft_with_reason(the draft reason).records::pr_bodyonly builds text;pr.rswrites it as before. A test keeps it at one call.Not in this change: Terraform state is not read (matches are graded instead). Engine version findings for ElastiCache, OpenSearch and MSK have guidance and a pull request path but no detection source yet: only RDS and Aurora
db-upgradeactions raise one today. Nothing here was run against a live AWS account.Verification
cargo fmt --check --all: clean.cargo clippy --workspace --all-targets -- -D warnings: clean.cargo test --workspace: common 2,240 passed, gateway 907 passed, worker 1,734 passed (incident and replay suites included), 0 failed.actions.rs); each locator (CloudFormation tag and lookup, CDK logical id, Terraform resource, generated identifier, local and registry module, variable file,for_each) inlocate.rsandterraform.rs; pull request versus runbook decisions and environment order (matching.rs); guidance validity and staleness (guidance.rs); runbook completeness (runbook.rs); the ticket, description and hold (records.rs).a_reason_names_the_file_and_the_line,the_fix_round_is_told_each_line_and_what_to_produce_instead,the_draft_section_sits_at_the_top_once_and_holds_the_pull_request(guard.rs);a_first_trip_is_one_fix_round_told_the_offending_line,a_fix_round_that_passes_the_guard_clears_the_refusal,a_second_trip_drafts_the_pull_request_and_falls_back_to_the_runbook,a_draft_stays_a_draft_through_later_description_rebuilds,no_further_attempt_until_the_code_or_the_target_changes(records.rs);a_tripped_guard_gets_one_fix_round_and_the_pull_request_stays_open,a_second_trip_makes_the_pull_request_a_draft_and_stops_automatic_attempts,the_draft_reason_holds_the_pull_request_and_nothing_closes_it_or_deletes_its_branch(infra_findings.rs).an_six_database_findings: six database findings, one in Terraform with a generated identifier, one Aurora cluster defined through a module, a patch and an upgrade pending on the same cluster, more than one page of databases.infratests pass (180), Lambda tests pass (507), launch template tests pass (16),cfn-lint infra/cfn/*.yamlis clean. The self-hosted permissions boundary already allows the new read (cloudformation:*inBOUNDARY_SERVICES).DescribeStackResourcescall, the reading of repositories, the queued fix round and the draft conversion are covered by type checks and by tests of the pure code they feed, not by a live run.