SG-103: Host+Port Beacon to Network Sink
Severity: MEDIUM
A HOST constant and a PORT constant declared in close proximity are both consumed by a client-side network primitive (not a server bind). Escalates to HIGH on stealth ports (1337/4444/6666/9001/31337) or an opt-out env-gate near the sink.
Fires when
- HOST and PORT constants declared together both feed a client network sink (fetch, requests.post, socket.send, etc.)
- The pair is used by outbound client code (not server-side .listen/bind) - an outbound beacon, not a listening server
- Severity escalates to HIGH on stealth port (1337/4444/6666/9001/31337) or opt-out env-gate near sink
Remediation
No safe remediation: a file that triggers this rule should be rejected, not patched. Read the flagged lines in the source before deciding.