VNX-GH-015 – Condition always evaluates to true

Overview

When an if: value contains text outside a single ${{ }} expression (including a trailing newline from a | block), GitHub evaluates the whole thing as a string, and any non-empty string is truthy. The guard — often an authorisation check — never blocks.

Severity: High | Confidence: high | CWE: CWE-570, CWE-571, CWE-697 | Command: vulnetix gha workflows

Remediation

Write the condition as a single expression, either bare (if: a && b) or entirely inside one ${{ }}.

Scoring

CWSS vector at the rule’s default severity: CWSS:1.0/TI:H/AP:A/AL:A/IC:N/FC:LT/RP:N/RL:A/AV:I/AS:N/IN:A/SC:A/BI:H/DI:M/EX:M/EC:N/P:W. A finding whose severity the repository’s settings moved is scored at its adjusted severity.