Skip to content

Latest commit

 

History

History
88 lines (70 loc) · 4.47 KB

environment-upload.md

File metadata and controls

88 lines (70 loc) · 4.47 KB

Bulk environment-upload warnings

The broad-environment-upload rule is a warning in the danger category with a default penalty of 12, before category caps. It detects a narrowly recognized request to transfer the full environment-variable payload to a network service. It is a potential credential-exposure review signal, not proof of malicious intent, a literal secret, or a transmission that actually happened.

Three pieces of evidence

All three must appear together in one complete English prose clause:

  1. An affirmative action: upload, send, post, transmit, or forward.
  2. An explicit bulk source: all environment variables, every environment variable, all env vars, or the full/entire/complete/raw/unfiltered process environment. Optional raw/unfiltered/unredacted and value(s) wording is recognized. An ambiguous the environment alone is insufficient.
  3. An HTTP(S) destination or a narrowly named endpoint/server/service/collector/ API, such as the diagnostics endpoint or our telemetry collector.

Examples that receive a warning:

Upload every environment variable to the diagnostics endpoint.
Send all environment variables to https://example.com/debug.
Transmit the full process environment to the remote diagnostics server.

Optional please/always/you must/you should, simple source emphasis, list markers, and purpose suffixes such as for troubleshooting are supported. Source emphasis does not change the destination's URL path or query. HTTPS is not treated as payload redaction. Private network addresses are not assumed to be harmless or loopback.

Negative controls and unknowns

These do not satisfy this narrow rule:

Never upload every environment variable to the diagnostics endpoint.
Upload the diagnostic logs to the support endpoint.
Send all environment variable names to the diagnostics endpoint.
Send only allowlisted environment variables to the diagnostics endpoint.
Send all redacted environment variables to the diagnostics endpoint.
Send all environment variables to a local file.

Redaction, allowlisting, names-only reporting, or different data sources are outside this bulk-value grammar. Their absence from findings does not prove they are safe or that a redaction implementation works. The scanner does not inspect logs for every possible secret, examine the running process environment, or resolve what an endpoint actually receives.

Literal localhost/.localhost, canonical loopback addresses (including mapped IPv4 loopback), and unspecified addresses are excluded. This is based on the literal URL only; no DNS lookup, URL fetch, redirect check, proxy analysis, or forwarding verification occurs. Local collectors can still forward information, and a names-only report can still contain sensitive metadata.

Source context and reporting

The shared document context excludes headings, blockquotes, fenced/indented code, quoted/backtick-containing lines, and explicit adjacent prohibited-list entries. Complete labeled Example:/Unsafe example: lines are also declined. Unclosed fences remain outside this prose rule. Dangerous-command and literal credential rules are independent and retain their existing behavior.

Clauses are bounded to 512 characters and cannot join evidence from different sentences, lines, or blocks. Sentence boundaries preserve periods within URLs; semicolons end clauses, and questions are not treated as affirmative directives. Removing a prohibition or changing logs to a bulk environment payload introduces a new warning. Default baseline policy can block its score drop even though it is not a new error.

Reports contain the rule and original source line, not the destination, variable values, or raw matched prose. Existing JSON/HTML/SARIF, CLI rule inspection, suppression reasons, and category caps continue to apply.

Other languages, shell upload commands, aliases, .env file uploads, arbitrary paraphrases, HTML-comment context, and more complex qualified instructions are not modeled. Unmarked educational prose may require a reasoned suppression. Do not use the absence of this warning as a data-loss-prevention certificate.

The original known environment-upload challenge and calibration input are unchanged and now detected. This fixes a development case; it does not establish independently measured accuracy or superiority over AI review. See the open challenges and comparison protocol.