Skip to content

Fixed syslog source panic on invalid or chunked input#4366

Merged
kashifkhan0771 merged 2 commits into
trufflesecurity:mainfrom
kashifkhan0771:fix/oss-279
Aug 6, 2025
Merged

Fixed syslog source panic on invalid or chunked input#4366
kashifkhan0771 merged 2 commits into
trufflesecurity:mainfrom
kashifkhan0771:fix/oss-279

Conversation

@kashifkhan0771

@kashifkhan0771 kashifkhan0771 commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Description:

Fixes: #3858

This PR fixes a panic in syslog that occurs when the input is in an invalid format or chunked at 8096 bytes. It also makes the --format flag required. Additionally, if TruffleHog fails to parse the input into the specified format, it ensures that the metadata is not nil, preventing potential panics. Tests have been added for various types of parsing scenarios.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@kashifkhan0771 kashifkhan0771 requested a review from a team as a code owner August 5, 2025 13:45
@kashifkhan0771 kashifkhan0771 requested a review from a team August 5, 2025 13:45
@kashifkhan0771 kashifkhan0771 requested a review from a team as a code owner August 5, 2025 13:45
@kashifkhan0771 kashifkhan0771 merged commit bd525f8 into trufflesecurity:main Aug 6, 2025
13 checks passed
@kashifkhan0771 kashifkhan0771 deleted the fix/oss-279 branch August 6, 2025 05:33
peterfraedrich pushed a commit to peterfraedrich/trufflehog that referenced this pull request Mar 15, 2026
…y#4366)

* Fixed syslog source panic on invalid or chunked input

* update test name
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.

syslog source: chunking metadata error

3 participants