Skip to main content

vulkro-sf rules

Writes, tests and manages your own YAML detection rules, and inspects the rule packs and playbooks that ship with the binary.

vulkro-sf rules new my-debug-rule # scaffold .vulkro-sf/rules/my-debug-rule.yaml
vulkro-sf rules validate .vulkro-sf/rules/my-debug-rule.yaml
vulkro-sf rules list

vulkro-sf scan loads custom rules automatically from .vulkro-sf/rules/ in the project (takes precedence) and ~/.vulkro/rules/. Set VULKRO_SF_CUSTOM_RULES_DIR to load only one folder, for example to test a rule pack in CI.

SubcommandWhat it does
new <id>Scaffold a working apex-ast rule (it flags System.debug). --force overwrites.
validate <file>Parse the rule and compile its match block (regex, XML or Apex AST).
list [PATH]List every custom rule the loader sees, in load order. Files that fail to parse are shown with a warning.
marketplace list|install|uninstall|updateInstall community rules from the signed bundle in the binary. The hash is checked before install; nothing is fetched from the network.
pack list|showInspect the bundled detector packs (NPSP, Veeva, Vlocity, Certinia).
playbook list|show <domain> <playbook>Inspect the bundled domain packs and their playbooks, such as healthcare phi-exposure-review.
appexchange [--validate]Print or check the mapping from findings to AgentExchange (formerly AppExchange) Security Review checklist sections.
import-checkmarx <xml>Translate an Apex query export from another scanner into a rule file. Only source and sink endpoints carry over.
import-semgrep <yaml>Translate an Apex rule file from another scanner. Compound patterns are skipped with a warning.

The importers write to .vulkro-sf/rules/ next to the input unless you pass --output, and every translated rule is checked to load before it is written. Review the output before you rely on it.

Rules are data only: they cannot run commands, touch files or use the network.

Exit codes​

CodeMeaning
0Success.
2Error (bad path, malformed or uncompilable rule, unknown id).

See also: Compound custom rules

Command reference​

Generated from vulkro-sf rules --help (vulkro-sf 0.33.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.

Write, test and manage your own custom rules.

vulkro-sf rules [OPTIONS] <COMMAND>
CommandWhat it does
listList every custom rule the loader currently sees, in load order.
marketplaceRule Marketplace: install / inspect community-shared SDK rules (Tier 7 item 2)
packCross-org portfolio reports (consultancy view). Plugin-pack inspection (Tier 7 item 3)
validateValidate a single custom-rule YAML file: parse it, compile its match block (regex / xml / apex-ast), and report any error.
newScaffold a starter apex-ast rule at ./.vulkro-sf/rules/<id>.yaml
import-semgrepTranslate an Apex rule YAML written for another scanner into the SF Custom Rule SDK format and write it to a loadable .yaml
appexchangeInspect and validate the AppExchange finding-to-checklist mapping.
playbookInspect the bundled PLAYBOOK bundles + DOMAIN PACKS (Wave 8, Epic J)
import-checkmarxTranslate an Apex query / rule export from another scanner into the SF Custom Rule SDK format and write it to a loadable .yaml

Options​

FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules list​

List every custom rule the loader currently sees, in load order.

vulkro-sf rules list [OPTIONS] [PATH]

Arguments​

ArgumentDescription
[PATH]Project root to inspect. Defaults to the current directory. Default: ..

Options​

FlagDescription
-f, --format <FORMAT>Output format: table or json. Default: table.
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules marketplace​

Rule Marketplace: install / inspect community-shared SDK rules (Tier 7 item 2).

vulkro-sf rules marketplace [OPTIONS] <COMMAND>
CommandWhat it does
listList every entry in the marketplace bundle, with each entry's installed state ("bundled" when the on-disk hash matches the bundle's pinned SHA-256, "modified" when the user edited the installed file, "not installed" when absent)
installCopy a rule's YAML body from the bundle to ~/.vulkro/rules/<rule_id>.yaml, after SHA-256 verifying it against the bundle's pinned hash. The Custom Rule SDK picks the installed file up on the next scan.
uninstallDelete ~/.vulkro/rules/<rule_id>.yaml. Refuses identifiers containing path separators or .. to avoid touching unrelated files.
updateRe-read the bundled marketplace index. v1 does not pull from the network: the bundle is shipped via signed redistribution. This action verifies the bundle still parses cleanly and clears any in-process parse cache so a swapped override is picked up.

Options​

FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules marketplace list​

List every entry in the marketplace bundle, with each entry's installed state ("bundled" when the on-disk hash matches the bundle's pinned SHA-256, "modified" when the user edited the installed file, "not installed" when absent)

vulkro-sf rules marketplace list [OPTIONS]
Options​
FlagDescription
-f, --format <FORMAT>Output format: table or json [default: table].
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules marketplace install​

Copy a rule's YAML body from the bundle to ~/.vulkro/rules/<rule_id>.yaml, after SHA-256 verifying it against the bundle's pinned hash. The Custom Rule SDK picks the installed file up on the next scan

vulkro-sf rules marketplace install [OPTIONS] <RULE_ID>
Arguments​
ArgumentDescription
<RULE_ID>The rule_id to install. See marketplace list for valid IDs.
Options​
FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules marketplace uninstall​

Delete ~/.vulkro/rules/<rule_id>.yaml. Refuses identifiers containing path separators or .. to avoid touching unrelated files

vulkro-sf rules marketplace uninstall [OPTIONS] <RULE_ID>
Arguments​
ArgumentDescription
<RULE_ID>The rule_id to uninstall. See marketplace list for what is installed locally.
Options​
FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules marketplace update​

Re-read the bundled marketplace index. v1 does not pull from the network: the bundle is shipped via signed redistribution. This action verifies the bundle still parses cleanly and clears any in-process parse cache so a swapped override is picked up

vulkro-sf rules marketplace update [OPTIONS]
Options​
FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules pack​

Cross-org portfolio reports (consultancy view). Plugin-pack inspection (Tier 7 item 3).

vulkro-sf rules pack [OPTIONS] <COMMAND>
CommandWhat it does
listList every bundled plugin pack with its rule count + status.
showShow the rules and manifest detail for one pack.

Options​

FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules pack list​

List every bundled plugin pack with its rule count + status

vulkro-sf rules pack list [OPTIONS]
Options​
FlagDescription
-f, --format <FORMAT>Output format: table or json [default: table].
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules pack show​

Show the rules and manifest detail for one pack

vulkro-sf rules pack show [OPTIONS] <PACK_ID>
Arguments​
ArgumentDescription
<PACK_ID>Pack identifier, e.g. npsp, veeva, vlocity, certinia
Options​
FlagDescription
-f, --format <FORMAT>Output format: table or json [default: table].
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules validate​

Validate a single custom-rule YAML file: parse it, compile its match block (regex / xml / apex-ast), and report any error.

vulkro-sf rules validate [OPTIONS] <RULE_YAML>

Arguments​

ArgumentDescription
<RULE_YAML>Path to the rule .yaml / .yml file to validate.

Options​

FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules new​

Scaffold a starter apex-ast rule at ./.vulkro-sf/rules/<id>.yaml.

vulkro-sf rules new [OPTIONS] <RULE_ID>

Arguments​

ArgumentDescription
<RULE_ID>Rule identifier, also the file stem. Must not contain a path separator or ..

Options​

FlagDescription
--forceOverwrite an existing rule file with the same id.
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules import-semgrep​

Translate an Apex rule YAML written for another scanner into the SF Custom Rule SDK format and write it to a loadable .yaml.

vulkro-sf rules import-semgrep [OPTIONS] <SEMGREP_YAML>

Arguments​

ArgumentDescription
<SEMGREP_YAML>Path to the rule file (YAML) in the other scanner's format.

Options​

FlagDescription
--output <OUT_FILE>Output path for the SF custom rules. Defaults to <input parent>/.vulkro-sf/rules/imported-semgrep.yaml
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules appexchange​

Inspect and validate the AppExchange finding-to-checklist mapping.

vulkro-sf rules appexchange [OPTIONS]

Options​

FlagDescription
--validateValidate the mapping (cross-check every signal against the classifier) instead of just listing it.
-f, --format <FORMAT>Output format for the listing: table or json. Default: table.
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules playbook​

Inspect the bundled PLAYBOOK bundles + DOMAIN PACKS (Wave 8, Epic J).

vulkro-sf rules playbook [OPTIONS] <COMMAND>
CommandWhat it does
listList every bundled domain pack and the playbooks it ships.
showShow one playbook's ordered steps + remediation guidance.

Options​

FlagDescription
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')

vulkro-sf rules playbook list​

List every bundled domain pack and the playbooks it ships

vulkro-sf rules playbook list [OPTIONS]
Options​
FlagDescription
-f, --format <FORMAT>Output format: table or json [default: table].
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules playbook show​

Show one playbook's ordered steps + remediation guidance

vulkro-sf rules playbook show [OPTIONS] <DOMAIN_ID> <PLAYBOOK_ID>
Arguments​
ArgumentDescription
<DOMAIN_ID>Domain-pack id, e.g. healthcare
<PLAYBOOK_ID>Playbook id within the pack, e.g. phi-exposure-review
Options​
FlagDescription
-f, --format <FORMAT>Output format: table or json [default: table].
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help.

vulkro-sf rules import-checkmarx​

Translate an Apex query / rule export from another scanner into the SF Custom Rule SDK format and write it to a loadable .yaml.

vulkro-sf rules import-checkmarx [OPTIONS] <CHECKMARX_XML>

Arguments​

ArgumentDescription
<CHECKMARX_XML>Path to the other scanner's XML export.

Options​

FlagDescription
--output <OUT_FILE>Output path for the SF custom rules. Defaults to <input parent>/.vulkro-sf/rules/imported-checkmarx.yaml
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')
Full vulkro-sf rules --help
Write, test and manage your own custom rules.

Custom Rule SDK.

Manage user-authored YAML detectors that drop into `.vulkro-sf/rules/` (project, takes precedence) or `~/.vulkro/rules/` (user-global). The `scan` command loads custom rules automatically; this subcommand exposes the inspection surface.

Environment variables: VULKRO_SF_CUSTOM_RULES_DIR When set, the loader reads ONLY this directory and skips both `.vulkro-sf/rules/` and `~/.vulkro/rules/`. Useful in CI to test a rule pack in isolation.

Exit codes: 0 = success; 2 = error (bad path, malformed rules).

Usage: vulkro-sf rules [OPTIONS] <COMMAND>

Commands:
list List every custom rule the loader currently sees, in load order
marketplace Rule Marketplace: install / inspect community-shared SDK rules (Tier 7 item 2)
pack Cross-org portfolio reports (consultancy view). Plugin-pack inspection (Tier 7 item 3)
validate Validate a single custom-rule YAML file: parse it, compile its match block (regex / xml / apex-ast), and report any error
new Scaffold a starter apex-ast rule at `./.vulkro-sf/rules/<id>.yaml`
import-semgrep Translate an Apex rule YAML written for another scanner into the SF Custom Rule SDK format and write it to a loadable `.yaml`
appexchange Inspect and validate the AppExchange finding-to-checklist mapping
playbook Inspect the bundled PLAYBOOK bundles + DOMAIN PACKS (Wave 8, Epic J)
import-checkmarx Translate an Apex query / rule export from another scanner into the SF Custom Rule SDK format and write it to a loadable `.yaml`
help Print this message or the help of the given subcommand(s)

Options:
-v, --verbose...
Bump stderr log verbosity. `-v` enables debug-level tracing for the `vulkro` + `vulkro_sf` targets; `-vv` enables trace. Honoured only when `RUST_LOG` is unset (an explicit `RUST_LOG` always wins)

-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged

--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb

-h, --help
Print help (see a summary with '-h')