Repository navigation
Conversation
sabban
left a comment
There was a problem hiding this comment.
Hi, thank you for your contribution!
-
The bypass relies on client-controlled markers: any request with a fake
Authorization: Basic …header (or aforgejo-runner/User-Agent) skips the WAF. I checked locally:GET /v2/.envis blocked, but passes withAuthorization: Basic Zm9vOmJhcg==. Since there's no Host check, this applies to every site behind the WAF, and/v2/is a very common API prefix. AsSkipProcessingalso creates no event, such requests would go through unnoticed. -
Rather than skipping the whole WAF, could you narrow it down? Depending on what fires:
- if it's the binary bodies (git packs, artifacts),
DisableBodyInspection()in apre_evalon those paths keeps all the other checks; - if specific rules misfire,
RemoveInBandRuleByName(...)/RemoveOutBandRuleByID(...)in apre_evaldisables only those, on those paths; - if it's one of our virtual patches, we'd rather fix the rule itself.
Which rules were blocking your Forgejo traffic?
cscli alerts inspect <id> -dshows them. - if it's the binary bodies (git packs, artifacts),
-
Please revert the
.index.jsonchange: this file is generated by CI after merge and must not be modified in PRs.
767753f to
0e211a7
Compare
|
Hi,
Debian apt use I would like create an appsec rule with custom Host, but I don't know how to share a rule with a configurable filter req.Host. There is a bunch of different scenario that trigger Crowdsec. I tried to reproduce the alerts, but I haven't been able to do so yet. I remember getting a lot of “Content-Type not allowed” errors (x-git-pack) and “too many browser submissions,” but I think my configuration was a little more... strict back then than it is now. |
Description
Add a community appsec-config skipping WAF evaluation for legitimate Forgejo automation (Actions runner RPC, job-container idtoken/artifacts/OIDC, Git Smart HTTP). Anonymous public clone works; receive-pack push, root /.git/, and non-protocol traffic stay evaluated. Tested locally via a harness through the real appsec runtime (29/29) + mkindex/hublint (0 errors).
Checklist
Additional Information
Script to make test