Skip to content

feat: add new formatter log output for github#59

Merged
theseion merged 7 commits intomainfrom
add-github-zerolog-output
Apr 25, 2026
Merged

feat: add new formatter log output for github#59
theseion merged 7 commits intomainfrom
add-github-zerolog-output

Conversation

@fzipi
Copy link
Copy Markdown
Member

@fzipi fzipi commented Nov 20, 2022

Signed-off-by: Felipe Zipitria felipe.zipitria@owasp.org

Modify logger to output in a format parseable by Github's runners.

Fixes #56.

Pending:

  • add tests on output

@fzipi fzipi force-pushed the add-github-zerolog-output branch 2 times, most recently from c343cf2 to f2418cf Compare February 27, 2024 20:22
Comment thread chore/update_copyright.go Outdated
@fzipi fzipi force-pushed the add-github-zerolog-output branch from 9eaefbd to 9ea579c Compare March 1, 2024 11:58
@fzipi
Copy link
Copy Markdown
Member Author

fzipi commented Mar 1, 2024

Moved commit 9ea579c to #122.

@fzipi fzipi force-pushed the add-github-zerolog-output branch from 8891875 to 932d12b Compare March 2, 2024 17:43
@fzipi fzipi marked this pull request as ready for review March 2, 2024 17:43
@fzipi fzipi requested a review from theseion March 2, 2024 17:43
@fzipi
Copy link
Copy Markdown
Member Author

fzipi commented Mar 2, 2024

@theseion Looks like test is failing (cmd/regex_compare_test.go:151) because the error was not triggered per if rootValues.output == gitHub... so probably we want to change the test?

@fzipi fzipi force-pushed the add-github-zerolog-output branch from 932d12b to 58bbb52 Compare March 2, 2024 20:47
Comment thread cmd/regex_compare.go Outdated
Comment thread cmd/regex_compare.go Outdated
Copy link
Copy Markdown
Contributor

@theseion theseion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Comment thread logger/logger_test.go Outdated
Comment thread logger/logger_test.go Outdated
Comment thread logger/logger_test.go Outdated
Comment thread logger/logger_test.go
fzipi added 2 commits August 14, 2025 19:32
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
@fzipi fzipi force-pushed the add-github-zerolog-output branch from eda978b to 7422dfa Compare August 14, 2025 22:35
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
@fzipi fzipi force-pushed the add-github-zerolog-output branch from 7422dfa to 43331f6 Compare August 14, 2025 22:37
@fzipi fzipi requested a review from theseion August 14, 2025 22:38
Comment thread logger/logger_test.go
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
@fzipi fzipi requested a review from theseion February 8, 2026 21:00
@theseion
Copy link
Copy Markdown
Contributor

@fzipi I've unresolved three comments, as the suggestions were not applied when I think they should have been.

@fzipi
Copy link
Copy Markdown
Member Author

fzipi commented Apr 25, 2026

@copilot Can you address theseion's open comments?

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

@copilot Can you address theseion's open comments?

Done in commit 998987e:

  • Renamed logTypelogLevel in all test table structs and their usages
  • Removed the stale commented-out line (after TestConsoleOutput)
  • Removed the // send logs to buffer comment from TestSetGithubOutput

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/coreruleset/crs-toolchain/releases
    • Triggering command: /tmp/go-build3741674024/b519/self_update.test /tmp/go-build3741674024/b519/self_update.test -test.testlogfile=/tmp/go-build3741674024/b519/testlog.txt -test.paniconexit0 -test.timeout=10m0s go_.�� rg/toolchain@v0.-p FkF2/59XKbKoR4ihgithub.com/coreruleset/crs-toolchain/v2/cmd/regex ux-amd64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: REDACTED, pid is -1 (http block)
    • Triggering command: /tmp/go-build3741674024/b526/updater.test /tmp/go-build3741674024/b526/updater.test -test.testlogfile=/tmp/go-build3741674024/b526/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build3741674024/b077/vet.cfg pkg/mod/golang.o-p rg/toolchain@v0.github.com/hashicorp/go-retryablehttp 0.1-go1.25.0.lin-lang=go1.23 (http block)
  • wordnetcode.princeton.edu
    • Triggering command: /tmp/go-build3741674024/b513/fp_finder.test /tmp/go-build3741674024/b513/fp_finder.test -test.testlogfile=/tmp/go-build3741674024/b513/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build3741674024/b355/vet.cfg --noprofile rg/toolchain@v0.github.com/coreruleset/crs-toolchain/v2/cmd/regex/generate ux-amd64/pkg/tool/linux_amd64/compile 7026221/b136/ (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Agent-Logs-Url: https://github.com/coreruleset/crs-toolchain/sessions/1505ba03-1173-4575-bc23-2783510abecc

Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
@theseion theseion merged commit 2a50d8a into main Apr 25, 2026
4 checks passed
@theseion theseion deleted the add-github-zerolog-output branch April 25, 2026 09:52
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.

Use configurable output, not the logger

3 participants