Merged
Conversation
Webhook payloads now include a machine-readable findings array alongside the existing markdown content. Each connector (Trivy, Socket Tier1, OpenGrep, TruffleHog) builds structured finding objects during format. The WebhookNotifier aggregates these into the payload with a severity summary and ISO 8601 timestamp. The notification.content field remains for backward compatibility. TruffleHog findings intentionally omit redacted secret values from the structured output.
Signed-off-by: lelia <lelia@socket.dev>
Signed-off-by: lelia <lelia@socket.dev>
Signed-off-by: lelia <lelia@socket.dev>
lelia
approved these changes
Mar 3, 2026
Contributor
lelia
left a comment
There was a problem hiding this comment.
LGTM - as discussed, we've converged on the plural cves list to be used within the findings object, rather than have Trivy and Socket Tier 1 diverge.
@dc-larsen for posterity, here are some examples of what the new JSON output may look like in webhook form:
Basic example with cves:
{
"repository": "demo/repo",
"branch": "main",
"scanner": "socket-security",
"timestamp": "2026-03-03T00:35:19Z",
"scan_type": "Socket CVE Scanning Results: Dockerfile",
"summary": {
"total": 1,
"critical": 1,
"high": 0,
"medium": 0,
"low": 0
},
"findings": [
{
"package": "bson",
"version": "1.0.9",
"ecosystem": "npm",
"purl": "pkg:npm/bson@1.0.9",
"cves": [
"CVE-2020-7610"
],
"severity": "critical",
"scanner": "trivy"
}
],
"notification": {
"title": "Socket CVE Scanning Results: Dockerfile",
"content": "| a | b |\\n|---|---|\\n| x | y |"
}
}Representative SAST example:
{
"repository": "local/app-tests-python",
"branch": "local-test",
"scanner": "socket-security",
"timestamp": "2026-03-03T00:54:31Z",
"scan_type": "SAST Python",
"summary": {
"total": 6,
"critical": 5,
"high": 1,
"medium": 0,
"low": 0
},
"findings": [
{
"rule": "python-command-injection",
"severity": "critical",
"file": "vulnerable_app.py",
"path": "workspace/app_tests/python/vulnerable_app.py",
"lines": "8-8",
"language": "sast-python",
"scanner": "opengrep"
},
{
"rule": "python-start-process-with-shell",
"severity": "critical",
"file": "vulnerable_app.py",
"path": "workspace/app_tests/python/vulnerable_app.py",
"lines": "8-8",
"language": "sast-python",
"scanner": "opengrep"
},
{
"rule": "python-subprocess-shell-true",
"severity": "critical",
"file": "vulnerable_app.py",
"path": "workspace/app_tests/python/vulnerable_app.py",
"lines": "8-8",
"language": "sast-python",
"scanner": "opengrep"
},
{
"rule": "python-hardcoded-secret",
"severity": "high",
"file": "vulnerable_app.py",
"path": "workspace/app_tests/python/vulnerable_app.py",
"lines": "10-10",
"language": "sast-python",
"scanner": "opengrep"
},
{
"rule": "python-pickle-usage",
"severity": "critical",
"file": "vulnerable_app.py",
"path": "workspace/app_tests/python/vulnerable_app.py",
"lines": "19-19",
"language": "sast-python",
"scanner": "opengrep"
},
{
"rule": "python-unsafe-deserialization",
"severity": "critical",
"file": "vulnerable_app.py",
"path": "workspace/app_tests/python/vulnerable_app.py",
"lines": "19-19",
"language": "sast-python",
"scanner": "opengrep"
}
],
"notification": {
"title": "SAST Python",
"content": "Rule | Severity | File | Path | Lines | Code | SubType | Scanner\n--- | --- | --- | --- | --- | --- | --- | ---\npython-command-injection | critical | vulnerable_app.py | workspace/app_tests/python/vulnerable_app.py | 8-8 | os.system(user_input) # Command injection vulnerability | sast-python | opengrep\npython-start-process-with-shell | critical | vulnerable_app.py | workspace/app_tests/python/vulnerable_app.py | 8-8 | os.system(user_input) # Command injection vulnerability | sast-python | opengrep\npython-subprocess-shell-true | critical | vulnerable_app.py | workspace/app_tests/python/vulnerable_app.py | 8-8 | os.system(user_input) # Command injection vulnerability | sast-python | opengrep\npython-hardcoded-secret | high | vulnerable_app.py | workspace/app_tests/python/vulnerable_app.py | 10-10 | password = \"hardcoded_password\" # Hardcoded secret | sast-python | opengrep\npython-pickle-usage | critical | vulnerable_app.py | workspace/app_tests/python/vulnerable_app.py | 19-19 | data = pickle.loads(open(\"user_data.pkl\", \"rb\").read()) # Unsafe deserialization | sast-python | opengrep\npython-unsafe-deserialization | critical | vulnerable_app.py | workspace/app_tests/python/vulnerable_app.py | 19-19 | data = pickle.loads(open(\"user_data.pkl\", \"rb\").read()) # Unsafe deserialization | sast-python | opengrep"
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
findingsarray of structured objects alongside the markdown tableWebhookNotifierpayload includestimestamp(ISO 8601),scan_type,summary(severity counts), andfindingsnotification.content(markdown) still presentNew payload shape
{ "repository": "...", "branch": "...", "scanner": "socket-security", "timestamp": "2026-02-27T19:49:33Z", "scan_type": "Socket CVE Scanning Results: Dockerfile", "summary": {"total": 71, "critical": 9, "high": 22, "medium": 12, "low": 10}, "findings": [ {"package": "bson", "version": "1.0.9", "ecosystem": "npm", "purl": "pkg:npm/bson@1.0.9", "cves": ["CVE-2020-7610"], "severity": "critical", "scanner": "trivy"} ], "notification": {"title": "...", "content": "markdown table..."} }Test plan
pkg:unknown/)