inkdex docs

Findings

Every rule inkdex-vuln reports, its CWE and its usual severity, and what proven and verify mean.

A finding is one place in your code (a sink, a secret, a setting) and one rule. The severity below is the rule's starting point; inkdex lowers it one step for an authenticated route, for data coming from a service your code called, and in a library scan. The verdict is proven when the index shows the whole path, verify when a human should look.

inkdex-vuln rules prints this list from the binary; inkdex-vuln rules VULN-SQLI says when a finding of that rule is proven.

Findings that come from a flow (most of the injection, file, request and denial-of-service rules) need data from outside to reach the place. The other rules are about the place itself (a secret, a weak primitive, a setting) and need no flow.

Injection

RuleWhat it isCWESeverity
VULN-SQLISQL injectionCWE-89critical
VULN-NOSQLINoSQL injectionCWE-943high
VULN-CMDIOS command injectionCWE-78critical (shell), high (program)
VULN-ARGIArgument injection into a program run without a shellCWE-88medium
VULN-CODEICode injectionCWE-94critical
VULN-SSTIServer-side template injectionCWE-1336high
VULN-LDAPILDAP injectionCWE-90high
VULN-XPATHIXPath injectionCWE-643high
VULN-XSSCross-site scriptingCWE-79high (low for data handed to a view, to verify)
VULN-HEADERHTTP response splittingCWE-113medium
VULN-LOGILog injectionCWE-117low
VULN-PROTOPrototype pollutionCWE-1321high
VULN-REFLECTUnsafe reflectionCWE-470medium
VULN-DESERDeserialization of untrusted dataCWE-502critical
VULN-XXEXML external entityCWE-611high

Files, requests and redirects

RuleWhat it isCWESeverity
VULN-PATHPath traversalCWE-22high
VULN-PATH-BUILDPath built from untrusted dataCWE-22medium
VULN-ZIPSLIPArchive entry written without a containment checkCWE-22medium
VULN-SSRFServer-side request forgeryCWE-918high
VULN-REDIRECTOpen redirectCWE-601medium

Access and session

RuleWhat it isCWESeverity
VULN-AUTHZAuthorization skipped on a record the request picksCWE-639medium
VULN-TRUST-BOUNDARYUntrusted data stored in the sessionCWE-501medium
VULN-CRYPTO-INPUTKey material from untrusted dataCWE-321high

Denial of service

RuleWhat it isCWESeverity
VULN-REDOSRegular expression from untrusted data, or a backtracking pattern applied to itCWE-1333medium
VULN-DOS-ALLOCAllocation sized by untrusted dataCWE-770medium
VULN-DOS-DECOMPRESSDecompressed data read without a size limitCWE-409medium
VULN-ATOMAtom table exhaustion (Elixir)CWE-400high
VULN-BODY-LIMITRequest body read without a size limitCWE-770low
VULN-DOS-TIMEOUTHTTP server without a read timeoutCWE-400low

Secrets and cryptography

RuleWhat it isCWESeverity
VULN-SECRETHard-coded secret or keyCWE-798 / CWE-321high for a provider's key, lower for a generic one
VULN-WEAK-HASHWeak hashCWE-328low to medium
VULN-WEAK-PASSWORD-HASHPassword hashed with a fast hash or a low costCWE-916medium
VULN-WEAK-CIPHERBroken cipherCWE-327high
VULN-ECBCipher in ECB modeCWE-327medium
VULN-STATIC-IVStatic IVCWE-329medium
VULN-WEAK-KEYKey too shortCWE-326high
VULN-WEAK-RNGPredictable random value used as a secretCWE-330 / CWE-338medium
VULN-TIMINGSecret compared in non-constant timeCWE-208low
VULN-JWT-VERIFYJWT signature verification disabled, or claims read without itCWE-347high / medium

Settings

RuleWhat it isCWESeverity
VULN-TLSTLS certificate verification disabledCWE-295high
VULN-DEBUGDebug mode enabledCWE-489medium
VULN-COOKIE-SECURECookie sent without the Secure flagCWE-614medium
VULN-COOKIE-HTTPONLYCookie readable by scripts (no HttpOnly)CWE-1004medium
VULN-CORSAny origin allowed by CORSCWE-942medium
VULN-WS-ORIGINWebSocket accepting any originCWE-1385medium
VULN-CSRFCSRF protection disabledCWE-352low
VULN-CLEARTEXTService reached over cleartext HTTPCWE-319low

Dangerous APIs (whatever their input)

RuleWhat it isCWESeverity
VULN-SQLISQL built from values, no source seenCWE-89medium
VULN-DESER-APIUnsafe deserialization APICWE-502medium
VULN-EVAL-APIDynamic code evaluationCWE-94 / CWE-95low
VULN-XSS-APIMarkup marked safeCWE-79medium
VULN-XXEXML parser resolving external entitiesCWE-611medium
VULN-TEMPFILEInsecure temporary fileCWE-377low
VULN-DANGEROUS-APIOther dangerous APIvarieslow

Dependencies

RuleWhat it isCWESeverity
VULN-DEPDependency with a known vulnerabilitythe advisory'sthe advisory's

Verdicts

VerdictMeaning
provenThe index shows it: an unsanitized flow from a request to the sink, a provider's key, a setting written in the code.
verifyLikely, to check with the evidence: a weaker flow, a generic secret, a weak primitive whose use is not known, a check known only by its name.

What lowers or removes a finding

  • An escaping or validation function inkdex knows (or one your code defines that clearly checks) protects the sinks it is meant for.
  • A value checked against a fixed list, or a URL whose host is pinned to fixed values, is no longer attacker-controlled.
  • Values the code builds only from constants reach no finding.
  • Test code, fixtures, examples, generated, vendored and minified files are left out.
  • Code that runs in the browser is not reported for server-only rules (SQL, shell, files).

On this page