Gitea / Forgejo log parser does not check API access
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Find the existing Gitea/Forgejo parser under the hub parsers (search for Gitea grok or router: completed). Add a pattern that matches 401 API authentication failures using the sample log and the suggested grok (timestamp, method, path, remote_ip, 401). Confirm the parser now extracts those failed API calls the same way successful ones are handled.
Written by the indexing model from the issue text.
Description
Currently the Gitea parser ignores failed API authentication. I don't have any experience with grok patterns, but according to https://www.javainuse.com/grok this should be enough:
^%{YEAR}/%{MONTHNUM}/%{MONTHDAY} %{TIME} .*?router: completed %{WORD:method} %{URIPATH:path} for %{IP:remote_ip}:%{NUMBER:remote_port}, 401 %{WORD} in
{YEAR}/%{MONTHNUM}/%{MONTHDAY} %{TIME} could probably be replaced with {GITEA_CUSTOMDATE:timestamp}
Sample log entry:
2026/07/22 19:40:17 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/v1/repos/flex/flexcore/hooks for 11.111.111.111:0, 401 Unauthorized in 1.8ms @ shared/middleware.go:60(shared.Middlewares.apiAuthentication)
- Dominant language
- Python
- Stars
- 257
- Forks
- 235
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 26
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from crowdsecurity/hub
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
crowdsecurity/hub#2020 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
crowdsecurity/hub#2009 ·
Maintainers usually reply within 1 day
-
The Authelia parser (v0.9) doesn't classify `Unsuccessful 1FA authentication attempt by user ''`Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
crowdsecurity/hub#2001 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
crowdsecurity/hub#1999 ·
Maintainers usually reply within 1 day
-
Time format with time zone in Home Assistant parserPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
crowdsecurity/hub#1998 · 6 comments ·
Maintainers usually reply within 1 day
All issues in crowdsecurity/hub
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 62/100
DaoCloud/DaoCloud-docs#7839 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
sav-oss-org/ptusa_main#1610 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug status/accepted type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/apm#4925 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sagemathinc/sagebrush#1701 ·
Maintainers usually reply within 1 day