# VNX-1269: Product Released in Non-Release Configuration

A Python debugger hook is left in production code, so the shipped program stops at an interactive debugger prompt (hanging the worker.

| Field | Value |
|---|---|
| Rule ID | `VNX-1269` |
| Severity | Low |
| SARIF level | `note` |
| Kind | `sast` |
| Languages | Python |
| CWE | [CWE-1269](https://cwe.mitre.org/data/definitions/1269.html) |
| CAPEC | [CAPEC-66](https://capec.mitre.org/data/definitions/66.html) |
| ATT&CK | [T1190](https://attack.mitre.org/techniques/T1190/) |
| CWSS vector | `CWSS:1.0/TI:L/AP:RU/AL:S/IC:N/FC:LT/RP:RU/RL:S/AV:L/AS:N/IN:A/SC:A/BI:L/DI:H/EX:L/EC:N/P:L` |
| Tags | `product-released-in-non-release-config` `debugger` `python` `cwe-1269` |
| Source | [`internal/sast/rules/vnx-1269.rego`](https://github.com/Vulnesis/cli/blob/main/internal/sast/rules/vnx-1269.rego) |

## Overview

VNX-1269 maps to [CWE-1269: Product Released in Non-Release Configuration](https://cwe.mitre.org/data/definitions/1269.html).

## Why this matters

A debugger hook left in shipped code stops the process at an interactive prompt. That hangs the worker, or hands a Python shell to whoever owns the terminal. A remote-debug listener (`debugpy.listen`, `ptvsd.enable_attach`) is worse: anyone who can reach the port can run arbitrary code.

## What gets flagged

```python
pdb.set_trace()
import ipdb; ipdb.set_trace()
breakpoint()
debugpy.listen(("0.0.0.0", 5678))
ptvsd.enable_attach(address=("0.0.0.0", 3000))
```

Not flagged: a hook inside `if args.pdb:` or `if os.environ.get("DEBUG"):`, methods of your own named `set_trace` or `breakpoint`, test files.

## Remediation

1. Remove the breakpoint before release, and add a lint or pre-commit check (for example ruff `T100`).
2. Put any debugging aid that has to stay behind an explicit, off-by-default setting.

## References

- [CWE-1269: Product Released in Non-Release Configuration](https://cwe.mitre.org/data/definitions/1269.html)

## Suppressing this rule

Put a `nosec` comment on the line, or on line 1 to cover the whole file. Use the comment marker of the file's language (`#`, `//`, `--` or `;`):

```text
# nosec vnx-1269
// nosec vnx-1269
```

Or record an ignore rule: `vulnetix ignore add --rule vnx-1269 --reason "..."`. See [Suppressing findings](/sast/guides/suppressing-findings.md).
