Skip to content

Manage operationcode.org DNS zone in Terraform - #192

Merged
irvingpop merged 4 commits into
mainfrom
dns-zone-terraform
Nov 1, 2026
Merged

irvingpop merged 4 commits into
mainfrom
dns-zone-terraform

Conversation

@irvingpop

@irvingpop irvingpop commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The operationcode.org zone changes from a data source to an aws_route53_zone resource with prevent_destroy.
  • 34 previously unmanaged records are imported. With the 8 existing coders.operationcode.org SES records, 42 records are managed in total.
  • All code is in terraform/dns_operationcode_org.tf.
  • The 8 ALB alias records reference aws_lb.ecs (dns_name and zone_id).

Plan

The imports are already applied. Before the import blocks were removed, the plan was 35 to import, 0 to add, 0 to change, 0 to destroy. The local apply from this branch gave 35 imported, 0 added, 0 changed, 0 destroyed. The import blocks were then removed (7948ae6). terraform plan on this branch now reports No changes. Your infrastructure matches the configuration.

Not in Terraform

  • Apex NS and SOA (owned by Route53).
  • 15 dead records were left out of Terraform and are now deleted from the live zone (the zone has 44 record sets):
    • rancher CNAME (dangling Azure name, takeover risk), blog A (IP no longer ours), vettec CNAME (TLS fails, 404)
    • staging CNAME (ELB target does not exist)
    • 7e3872bd410d2239f5d3d1787021af41.blog CNAME (old Comodo check for the dead blog)
    • resources.staging A and AAAA (follow-up: remove the front-end references at front-end/src/lib/config/environment.ts:33 and front-end/src/lib/utils/api-utils.ts:12)
    • apex SPF (type 99; the same text stays as TXT)
    • _jabber._tcp SRV (target does not resolve)
    • dev CAA (copy of the apex CAA)
    • ACM validation CNAMEs for pybot.dev, pybot, pybot.qa, pybot.staging (no cert uses them)
    • _13f44eba4c5bd4c605b42ea9ecd53830.www CNAME (only an expired us-east-1 cert uses it)

Records that need an owner check

These are imported as-is and commented with INVESTIGATE:

  • SendGrid: 5672389, s1/s2 DKIM, link.notify, mail.notify, o1.notify
  • Mailchimp: k2/k3 DKIM (used by back-end code, likely keep)
  • Mailgun: SPF include on the apex TXT (no code uses it)
  • Google: two google-site-verification TXT values
  • DigitalOcean: community (live server, SSH answers) and nfs.services
  • Cloudways: services, plus kibana, mautic, test, slash-commands
  • Vercel: _now verification TXT

Mandrill DKIM and the Mandrill SPF include are live and must stay.

Out of scope / follow-ups

  • The operationcode.net zone (later phase).
  • DNS best practices: DMARC to quarantine/reject with rua and Google DKIM, CAA issue tags, SPF trim to -all, DNSSEC, query logging, longer TTLs.

How to verify

Nothing is left to apply. CI does not apply; plans run locally.

cd terraform && terraform init && terraform plan   # expect: No changes

🤖 Generated with Claude Code

irvingpop and others added 3 commits October 31, 2026 15:15
…t blocks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ALB references

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🟡 Clear to proceed: Claude of Duty logged 1 item to consider

Mission: Review the code. Protect the branch. Deploy the future.

Note

1 finding to consider. It does not block this PR.
Next step for the author: read the finding and fix what you agree with.

Severity Effect Where Finding Found by
🟠 Medium Does not block terraform/dns_operationcode_org.tf:5 Zone and records have no import blocks despite the description See the inline comment. Review (medium)
File checks Review Security Supply chain Dependency review Coverage
✅ ok, 1 signal ✅ ran, 1 finding ✅ ran, 0 findings ✅ ran, 0 findings ✅ ok ✅ complete

Run 41323082768, attempt 1 for head 7948ae6 into main. The required workflow in the merge box is the result that counts.

Claude of Duty never approves a PR. A human reviewer gives the final approval.

📋 Full review record: reasons, checks, signals, finding details, model summaries, token usage

Reviewed snapshot

Head SHA Merge base SHA Base branch Run
7948ae6dbd3dc27172a469c607efd250ae951cc9 f38a8ca497f39163b507ff4876a229fd8a22eff2 main 41323082768, attempt 1

Reasons the gate failed

None. No reason applies.

Checks (code, no model)

Check Result Detail
Hard blocks ✅ none
Coverage ✅ complete files in comparison 2, files collected 2, trees complete
Dependency changes ✅ none
Dependency review job ✅ success

Signals (context only, never block)

  • ℹ️ Encoded blob: base64 run longer than 200 characters, in terraform/dns_operationcode_org.tf, lines 341

Dependency changes

None.

Finding details

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Blocking is decided by code from category and severity, never by the model. A finding in a blocking category blocks only at high or critical severity.

Pass Severity Category Confidence Citation Posted Model title
Review medium bug medium ✅ checked inline Zone and records have no import blocks despite the description

The Security pass completed and reported no findings.

The Supply chain pass completed and reported no findings.

Model summaries

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Pass Status Model Summary
Review ✅ ok claude-sonnet-5-5 The PR replaces the route53 data source with a managed zone resource and adds 34 imported records. The removed route53.tf's records are re-declared in the new file with the same resource addresses, so state is preserved. The visible diff has no clear correctness bug. Import blocks that the description mentions are not in the shown file, which is a discrepancy but not a demonstrable bug.
Security ✅ ok claude-sonnet-5-5 The PR converts the operationcode.org Route53 zone from a data source to a managed resource and imports 34 existing records, removing the old route53.tf. The records are public DNS data, and the DKIM public key and verification TXT values are not secrets. No injection, credential, or prompt-injection content was found. The long base64-like run flagged by the prefilter is a public DKIM key. Some imported records point at possibly dead third-party services (dangling-DNS takeover risk), but this exists today and is only imported as-is, so I am not reporting it as a PR-introduced vulnerability.
Supply chain ✅ ok claude-sonnet-5-5 The PR converts the operationcode.org Route53 zone from a data source to a managed resource and imports about 34 existing DNS records. It removes route53.tf and moves its SES records into a new file. The prefilter's encoded-blob signal is the Mandrill DKIM public key in a TXT record, which is a normal DKIM value and not a payload. No install scripts, CI changes, dependency changes, dynamic code, network calls or text aimed at an AI reviewer were found. The new records point to well-known third-party services such as Vercel, SendGrid, Mailchimp and SES, plus a few legacy DigitalOcean and Cloudways IPs that the author flags for owner review. Nothing here looks designed to cause harm.

Token usage

Pass Input Output Cache write Cache read Attempts
Review 721 386 0 26813 1
Security 1047 202 0 26813 1
Supply chain 1239 252 26813 0 1
Total 3007 840 26813 53626 3

The 35 imports were applied locally. terraform plan now reports No changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude of Duty review, run 41323082768: 1 inline finding(s). Model output from untrusted input. Check it before you act on it. The gate result is in the summary comment.

# A sibling dns_operationcode_net.tf is planned for operationcode.net.

# Hosted zone for operationcode.org (imported; never destroy)
resource "aws_route53_zone" "operationcode" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium bug, confidence medium, pass review

Zone and records have no import blocks despite the description

The PR says import blocks at the bottom of the file bring in the zone and 34 records (35 imports), but the file ends at line 463 with no import blocks. Other files are not shown, so they may exist elsewhere. If they are missing, a plan would try to create a duplicate zone and the 34 records. Creating the duplicate zone would use new nameservers, and record creation would fail with already-exists errors. Applying as the description instructs would not be a state-only import.

Model output from untrusted input. Check it before you act on it.

@irvingpop
irvingpop merged commit ffea3f6 into main Nov 1, 2026
5 checks passed
@irvingpop
irvingpop deleted the dns-zone-terraform branch November 1, 2026 16:08
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