CDN bot protection blocks QA test runs

Đang mở
#151 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 7 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
aws, github-actions, playwright
Lĩnh vực
devops, security, testing

Hướng nghiên cứu

The repo-side work is in .github/workflows/qa.yml, where the bypass secret and header name would be passed only to the Playwright test steps, plus the Playwright config, where traces must be disabled whenever the header is set and the header must be scoped to the site's own host. The AWS WAF rule and the secret setup belong to infra and repo admins and cannot be done from code. Done means a manual QA run against staging and prod returns no 403s, and traces stay off when the header is present.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What's wrong: strapi.io (prod and staging) is behind CloudFront + AWS WAF bot protection. After a burst of automated requests, it answers Playwright test traffic with HTTP 403 "Request blocked … Generated by cloudfront"; WebKit gets blocked almost immediately. Test runs then fail on blocked pages instead of on real issues (the tests now report "Unexpected HTTP status … 403"). CI and scheduled runs (.github/workflows/qa.yml) will hit the same.

Ask (infra / CDN owners): an AWS WAF rule that lets requests carrying a secret header through:

  • match header x-qa-bypass (name up to you) against a secret value
  • action Allow, placed before the bot-control and rate-based rules (or exclude matching requests from them via a scope-down statement)
  • on both CloudFront distributions, staging and prod
  • share the value with QA through a secure channel (not chat or Jira); rotate it if it leaks

An IP allowlist doesn't work well: GitHub-hosted runners don't have fixed IPs.

Ask (repo admins): GitHub → Settings → Secrets and variables → Actions:

  • secret CDN_BYPASS_HEADER_VALUE
  • variable CDN_BYPASS_HEADER_NAME, only if the header isn't x-qa-bypass
  • optionally, put the secret in a GitHub Environment restricted to staging and main

QA side (how the secret stays safe):

  • the header is only sent to our own host, never to third-party scripts (Cookiebot, Google, HubSpot, …)
  • only the test steps in qa.yml get it; the workflow is manual-only, and runs from forks never receive secrets
  • Playwright traces are disabled while it's set (they record headers and are uploaded as artifacts in our public repo); Lighthouse runs without it

Done when: a full QA run against prod and staging with the header gets no 403s.

Ngôn ngữ chính
TypeScript
Star
6
Fork
5
Merge trung bình
5 ngày 6 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của strapi/website

Tất cả issue của strapi/website

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.