Skip to content

fix(security): harden crawler boundaries - #91

Merged
max23468 merged 2 commits into
mainfrom
codex/security-hardening
Jul 29, 2026
Merged

fix(security): harden crawler boundaries#91
max23468 merged 2 commits into
mainfrom
codex/security-hardening

Conversation

@max23468

Copy link
Copy Markdown
Owner

Cosa cambia

  • centralizza tutte le richieste del crawler con allowlist di origine e porta, redirect manuali, classificazione DNS e pinning degli indirizzi pubblici
  • limita body, budget aggregato e traversal/struttura delle sitemap
  • vincola i feedback Codex all’identità GitHub immutabile e filtra/coalesce gli eventi pubblici del workflow
  • documenta i nuovi guardrail e aggiunge test security mirati

Causa radice

Le fetch di risorse, robots e sitemap applicavano controlli diversi e tardivi; il workflow feedback riconosceva Codex tramite una regex sul login e partiva anche per eventi pubblici non pertinenti.

Verifiche

  • npm test — 63 test verdi
  • npm run test:coverage — 92,87% linee, 75,81% branch
  • npm run build
  • actionlint .github/workflows/codex-pr-comments.yml
  • npm audit --audit-level=high — 0 vulnerabilità
  • npm run sentinel -- scan --dry-run --site sancarlo-sviluppo — 41 URL, 0 problemi

Nessun deploy o release incluso: runtime operativo e dashboard restano canali separati.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be5b464ec3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/robots.ts
Comment thread src/outbound.ts
@github-actions github-actions Bot mentioned this pull request Jul 29, 2026
24 tasks
@max23468
max23468 merged commit ee12006 into main Jul 29, 2026
7 of 8 checks passed
@max23468
max23468 deleted the codex/security-hardening branch July 29, 2026 12:14

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad4351da3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/outbound.ts
Comment thread src/sitemap.ts
Comment thread src/outbound.ts
max23468 added a commit that referenced this pull request Jul 29, 2026
Il client outbound creava e chiudeva un Agent per ogni richiesta, quindi le
centinaia di pagine di uno stesso monitor rifacevano handshake TCP/TLS e
risoluzione DNS: con il timeout di 10 minuti del workflow gli scan grandi
rischiavano di scadere prima di produrre output. Ora i dispatcher sono
pooled per insieme di indirizzi fissati, il DNS è risolto una volta per
host e lo scan chiude i pool in un finally.

Chiude anche due thread Codex della PR #91: le sitemap duplicate non
consumano più il budget di 32 prima di essere deduplicate al dequeue, e la
classificazione degli indirizzi copre i prefissi IPv6 non globali e di
transizione (Teredo, 6to4, NAT64, ORCHIDv2, SRv6, doc 3fff::/20) più il
relay 6to4 IPv4 192.88.99.0/24.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
max23468 added a commit that referenced this pull request Jul 29, 2026
Il client outbound creava e chiudeva un Agent per ogni richiesta, quindi le
centinaia di pagine di uno stesso monitor rifacevano handshake TCP/TLS e
risoluzione DNS: con il timeout di 10 minuti del workflow gli scan grandi
rischiavano di scadere prima di produrre output. Ora i dispatcher sono
pooled per insieme di indirizzi fissati, il DNS è risolto una volta per
host e lo scan chiude i pool in un finally.

Chiude anche due thread Codex della PR #91: le sitemap duplicate non
consumano più il budget di 32 prima di essere deduplicate al dequeue, e la
classificazione degli indirizzi copre i prefissi IPv6 non globali e di
transizione (Teredo, 6to4, NAT64, ORCHIDv2, SRv6, doc 3fff::/20) più il
relay 6to4 IPv4 192.88.99.0/24.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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