test(gitea-curl): pin exact RC #11721 short-flag equals forms #36
Reference in New Issue
Block a user
Delete Branch "fix/gitea-curl-11721-short-forms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds explicit regression cases for the exact short-flag equals-attached forms identified in RC #11721:
-H=Authorization: token-H=Authorization=Bearer xyzThe structural argv scan in
bin/gitea-curl(merged via #34) already catches these: it strips leading dashes, splits on the first=, and case-insensitively checks forauthorization/proxy-authorization. This PR pins the exact forms so they cannot silently regress.All 32 tests pass locally.
APPROVED: Reviewed head
aba5265b9c53e051aeb0d52cf12e3ca4fed77f4b.This is test-only: the only changed file is
scripts/test_gitea_curl.py, adding explicit regression cases for the exact RC #11721 short-flag equals forms.Verification:
-H=Authorization: token; it exits non-zero with the wrapper refusal message.-H=Authorization=Bearer xyz; it also exits non-zero with the wrapper refusal message.REJECT_CASES, so they exercise the same parametrized non-zero/refusal assertion path as the rest of the credential-argv guard matrix.5-axis: correctness/security coverage improves for the remaining short-form bypass spellings; robustness/readability are fine; no production code or performance impact; scope is appropriately limited to regression tests.
Approved on head
aba5265b9c. Exact-head CI is green. The change is test-only and load-bearing: the two added RC #11721 cases are in REJECT_CASES, so they run the real gitea-curl wrapper and assert non-zero/refusal. I also spot-checked both exact argv forms locally (-H=Authorization: token and -H=Authorization=Bearer xyz); both exit non-zero with the inline Authorization refusal.Approved on head
aba5265b9c. Exact-head CI is green. The change is test-only and load-bearing: the two added RC #11721 cases are in REJECT_CASES, so they run the real gitea-curl wrapper and assert non-zero/refusal. I also spot-checked both exact argv forms locally (-H=Authorization: token and -H=Authorization=Bearer xyz); both exit non-zero with the inline Authorization refusal.aba5265b9cto223ac9ac9eNew commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
APPROVED: I reviewed molecule-ci #36 at head
223ac9ac9e.The rebase/conflict resolution is correct: the diff is test-only and keeps the exact #11721 short-flag equals forms as explicit rejection cases:
-H=Authorization: token-H=Authorization=Bearer xyzThese sit alongside the existing
-H=Authorization: token SECRETregression case and exercise the same wrapper reject path by asserting non-zero exit for unsafe Authorization header forms. No production wrapper code changes, no token material, and no unrelated files changed.Exact-head CI is green on
223ac9ac: Workflow YAML lint, Python script lint, Validator pytest suites, and Secrets scan all succeeded.Note: my prior #11740 approval and Researcher's #11741 approval were stale/dismissed on the old head, so this approval is for the rebased current head.
APPROVE on
223ac9ac9e.Re-reviewed the rebased head: this is test-only in scripts/test_gitea_curl.py, preserving the branch's exact RC #11721 short-flag equals cases alongside main's existing coverage. The added cases exercise the wrapper and assert the Authorization forms fail closed. Exact-head CI is green.