Skip to main content

Bruteforce sinks (adversarial-payload reachability)

--bruteforce-sinks statically drives a fixed set of hostile payloads at every risky call site and reports each payload that reaches the call without a recognised guard.

vulkro scan . --bruteforce-sinks
vulkro scan . --bruteforce-sinks --bruteforce-categories sql,payment,llm

Nothing is executed and no network call is made: it is a walk over your code. It is off by default because it is the slowest pass. In the local console, turn it on in the scan run options. Languages: Python, JavaScript and TypeScript.

What it adds to taint analysis​

Taint analysis says an input reaches stripe.charges.create. This pass says which kinds of input get there, for example:

  • amount = -1 reaching a payment call with no sign check
  • ../../admin reaching s3.getObject with no path check
  • ignore previous instructions reaching an LLM call with no system and user role split
  • ' OR 1=1 -- reaching cursor.execute with no parameter binding

Sink categories​

TagExamples
sqlcursor.execute, Sequelize.query, knex.raw, prisma.$queryRaw
shellsubprocess.run(shell=True), child_process.exec, os.system
httprequests.get, httpx.post, axios.*, fetch
paymentstripe.charges.create, braintree.transaction.sale, razorpay.orders.create
llmanthropic.messages.create, openai.chat.completions.create, bedrock.invoke_model
file-writeopen(path, 'w'), Path.write_text, fs.writeFile
deserializationpickle.loads, yaml.load, eval, vm.runInNewContext
emailsendgrid.send, ses.send_email, smtplib.sendmail

Payload classes (--bruteforce-payload-classes): type-confusion, numeric-extreme, size-extreme, unicode, injection, path-traversal, prompt-injection, payment-extreme.

Recognised guards include type and null checks, length and range checks, anchored regexes, allowlists, sanitisers (html.escape, DOMPurify.sanitize, shlex.quote), parameter binding, path canonicalisation, schema validation (Pydantic, Zod, Joi, Yup, AJV) and yaml.SafeLoader.

Confidence​

LevelMeaning
High (default)No recognised guard on the path.
MediumA guard exists but is not shown to cover this payload class. Opt in with --bruteforce-confidence medium.

Rule IDs​

BFS-<CATEGORY>-<payload-tag>, for example BFS-SQL-sql-or-1-eq-1 or BFS-PAYMENT-payment-negative-amount. IDs are stable across runs, so baselines can key on them.

Environment variables​

VariableDefaultMeaning
VULKRO_BRUTEFORCE_SINKSunset1 turns the pass on
VULKRO_BRUTEFORCE_DEPTH6Call depth, 2 to 12
VULKRO_BRUTEFORCE_PATHS_PER_FN64Paths per function, 8 to 512
VULKRO_BRUTEFORCE_CATEGORIESallComma-separated tags
VULKRO_BRUTEFORCE_CONFIDENCEhighhigh or medium
VULKRO_BRUTEFORCE_PAYLOAD_CLASSESallComma-separated tags

See also: Attack paths, Taint analysis