FINCHIP SECURITY SKILL · VERIFIED RUNS

Flag dangerous code patterns before they ship.

An offline, zero-dependency, rule-based SAST-lite Skill. Pass source files inline and get line-level evidence, severity, remediation guidance, plus a block / review / pass release verdict.

0 network calls0 API keysPython ≥3.911 fixed checks
audit / case-01
INPUTpayments_api.py
cursor.execute(f"SELECT ... {user_id}") requests.get(url, verify=False) return eval(...)
→
FINDINGS6 total
HIGH sql_injection HIGH dangerous_eval HIGH tls_verification_disabled MEDIUM debug_enabled
RELEASE VERDICTBLOCK
01 · BEFORE / AFTER

Security review should not depend on memory and scattered grep

Lightweight manual review often breaks between finding a risky line and producing repeatable, prioritized evidence a team can act on.

BEFOREMANUAL / FRAGMENTED
01
Manual dangerous-API huntingRules live across reviewer memory, checklists, and ad-hoc grep.
02
Inconsistent prioritizationFindings still need hand-sorted severity and release impact.
03
Unstable evidence formatPath, line, rule, and remediation fields are easy to lose.
04
Repeated cost for lightweight checksThe same patterns get re-checked in every review.
AFTER · ACTUAL CASE 01STRUCTURED JSON
VerdictBLOCK
Findings6
High3
Files1
ACTUAL PROMPT

Audit this payment API for dynamic code execution, SQL injection, TLS configuration, debug mode, and network exposure. Return severities and remediation guidance.

HIGHdangerous_eval· app/payments_api.py:9

return eval(request.args["expr"])

HIGHsql_injection· app/payments_api.py:14

cursor.execute(f"SELECT * FROM invoices WHERE user_id = {user_id}")

HIGHtls_verification_disabled· app/payments_api.py:18

return requests.get(url, verify=False)

02 · CAPABILITIES

Fixed rules. Deterministic output.

It is not a full SAST engine and does not claim business-context understanding. Its value is offline execution, repeatability, and a stable result schema for fast security gates.

01 / EVIDENCE

Line-level evidence

Every finding carries path, line, rule_id, category, severity, excerpt, and recommendation.

02 / TRIAGE

Block / Review / Pass

High findings trigger block; Medium-only findings trigger review; otherwise pass.

03 / COVERAGE

Code + config + compliance

Checks code execution, command injection, deserialization, SQL, TLS, crypto, DEBUG, CORS, binding, randomness, and LICENSE.

04 / RUNTIME

Fully offline

Python standard library only; no network, API keys, or filesystem writes.

11fixed checks
5 / 3 / 3High / Medium / Low*
1execution mode: audit
JSONdeterministic output

* Low includes 2 line rules plus the repo-level missing_license check.

03 · WORKFLOW

One fixed path from source to release verdict

01

Inline source

Provide each file as {path, content} in the files array.

02

Line-by-line scan

Fixed regex rules scan each line, with guards on selected checks.

03

Structured findings

Return evidence, category, severity, and remediation.

04

Sort & summarize

Sort High → Medium → Low, then path and line.

05

Release verdict

Emit block / review / pass.

04 · REAL RUNS

3 real English execution cases

Each case preserves the actual JSON input, actual stdout, and a result screenshot rendered directly from that stdout.

CASE 01

High-risk payment API

Dynamic execution, SQL injection, TLS, debug mode, and bind exposure

ACTUAL PROMPT

Audit this payment API for dynamic code execution, SQL injection, TLS configuration, debug mode, and network exposure. Return severities and remediation guidance.

VerdictBLOCK
Findings6
High3
Files1
HIGHdangerous_eval· app/payments_api.py:9

return eval(request.args["expr"])

HIGHsql_injection· app/payments_api.py:14

cursor.execute(f"SELECT * FROM invoices WHERE user_id = {user_id}")

HIGHtls_verification_disabled· app/payments_api.py:18

return requests.get(url, verify=False)

MEDIUMdebug_enabled· app/payments_api.py:20

app.run(host="0.0.0.0", debug=True)

$ python3 code_audit.py inputs/en_case1_web_api.json
Executed with Python 3. Stdout is one structured JSON object. The prompt is preserved in the input for documentation; scan logic reads mode + files.
Expand full actual Output / Result
{
  "ok": true,
  "skill": "code-security-audit",
  "version": "0.1.0",
  "mode": "audit",
  "data": {
    "findings": [
      {
        "path": "app/payments_api.py",
        "line": 9,
        "rule_id": "dangerous_eval",
        "category": "code_execution",
        "severity": "high",
        "excerpt": "return eval(request.args[\"expr\"])",
        "recommendation": "Avoid eval/exec on dynamic input; use explicit parsing (e.g. ast.literal_eval) or a dispatch table instead."
      },
      {
        "path": "app/payments_api.py",
        "line": 14,
        "rule_id": "sql_injection",
        "category": "injection",
        "severity": "high",
        "excerpt": "cursor.execute(f\"SELECT * FROM invoices WHERE user_id = {user_id}\")",
        "recommendation": "Use parameterized queries / bound parameters instead of string concatenation or formatting to build SQL."
      },
      {
        "path": "app/payments_api.py",
        "line": 18,
        "rule_id": "tls_verification_disabled",
        "category": "transport",
        "severity": "high",
        "excerpt": "return requests.get(url, verify=False)",
        "recommendation": "Keep TLS certificate verification enabled; configure a trusted CA bundle rather than disabling verification."
      },
      {
        "path": "app/payments_api.py",
        "line": 20,
        "rule_id": "debug_enabled",
        "category": "config",
        "severity": "medium",
        "excerpt": "app.run(host=\"0.0.0.0\", debug=True)",
        "recommendation": "Disable debug mode in production; it can expose stack traces and enable interactive code execution."
      },
      {
        "path": "<repo>",
        "line": 0,
        "rule_id": "missing_license",
        "category": "compliance",
        "severity": "low",
        "excerpt": "",
        "recommendation": "Add a LICENSE file (e.g. LICENSE or LICENSE.txt) so usage terms are explicit and license compliance can be assessed."
      },
      {
        "path": "app/payments_api.py",
        "line": 20,
        "rule_id": "bind_all_interfaces",
        "category": "config",
        "severity": "low",
        "excerpt": "app.run(host=\"0.0.0.0\", debug=True)",
        "recommendation": "Binding to 0.0.0.0 exposes the service on all interfaces; bind to a specific interface or place it behind a firewall/proxy."
      }
    ],
    "summary": {
      "files_scanned": 1,
      "total": 6,
      "by_severity": {
        "high": 3,
        "medium": 1,
        "low": 2
      },
      "by_category": {
        "code_execution": 1,
        "injection": 1,
        "transport": 1,
        "config": 2,
        "compliance": 1
      }
    },
    "verdict": "block"
  }
}
CASE 02

Background task worker

Deserialization, shell=True, MD5, and token randomness

ACTUAL PROMPT

Audit this background task worker for unsafe deserialization, shell command execution, weak hashing, insecure token randomness, and repository license status.

VerdictBLOCK
Findings4
High2
Files2
HIGHunsafe_deserialization· worker/task_worker.py:8

job = pickle.loads(payload)

HIGHshell_injection· worker/task_worker.py:9

subprocess.run(command, shell=True)

MEDIUMweak_hash· worker/task_worker.py:10

digest = hashlib.md5(payload).hexdigest()

LOWinsecure_random_for_token· worker/task_worker.py:11

token = random.choice("abcdef0123456789")

$ python3 code_audit.py inputs/en_case2_worker.json
Executed with Python 3. Stdout is one structured JSON object. The prompt is preserved in the input for documentation; scan logic reads mode + files.
Expand full actual Output / Result
{
  "ok": true,
  "skill": "code-security-audit",
  "version": "0.1.0",
  "mode": "audit",
  "data": {
    "findings": [
      {
        "path": "worker/task_worker.py",
        "line": 8,
        "rule_id": "unsafe_deserialization",
        "category": "deserialization",
        "severity": "high",
        "excerpt": "job = pickle.loads(payload)",
        "recommendation": "Never deserialize untrusted data; use json, or yaml.safe_load with an explicit safe Loader."
      },
      {
        "path": "worker/task_worker.py",
        "line": 9,
        "rule_id": "shell_injection",
        "category": "command_injection",
        "severity": "high",
        "excerpt": "subprocess.run(command, shell=True)",
        "recommendation": "Do not build shell commands from untrusted input; pass an argument list and avoid shell=True."
      },
      {
        "path": "worker/task_worker.py",
        "line": 10,
        "rule_id": "weak_hash",
        "category": "crypto",
        "severity": "medium",
        "excerpt": "digest = hashlib.md5(payload).hexdigest()",
        "recommendation": "Use a strong algorithm (SHA-256+ for hashing, AES-GCM for encryption); avoid MD5, SHA-1, DES, and ECB mode."
      },
      {
        "path": "worker/task_worker.py",
        "line": 11,
        "rule_id": "insecure_random_for_token",
        "category": "crypto",
        "severity": "low",
        "excerpt": "token = random.choice(\"abcdef0123456789\")",
        "recommendation": "Use the 'secrets' module (or os.urandom) for tokens, secrets, passwords, and nonces instead of the 'random' module."
      }
    ],
    "summary": {
      "files_scanned": 2,
      "total": 4,
      "by_severity": {
        "high": 2,
        "medium": 1,
        "low": 1
      },
      "by_category": {
        "deserialization": 1,
        "command_injection": 1,
        "crypto": 2
      }
    },
    "verdict": "block"
  }
}
CASE 03

Service config & legacy crypto

Production DEBUG, wildcard CORS, SHA-1, and bind-all configuration

ACTUAL PROMPT

Audit this service configuration and crypto helper for production debug settings, CORS, weak hashing, and bind address. Decide whether release should be blocked or reviewed.

VerdictREVIEW
Findings4
High0
Files2
MEDIUMdebug_enabled· config/service.py:3

DEBUG = True

MEDIUMcors_wildcard· config/service.py:4

HEADERS = {"Access-Control-Allow-Origin": "*"}

MEDIUMweak_hash· config/service.py:9

return hashlib.sha1(data).hexdigest()

LOWbind_all_interfaces· config/service.py:5

HOST = "0.0.0.0"

$ python3 code_audit.py inputs/en_case3_config.json
Executed with Python 3. Stdout is one structured JSON object. The prompt is preserved in the input for documentation; scan logic reads mode + files.
Expand full actual Output / Result
{
  "ok": true,
  "skill": "code-security-audit",
  "version": "0.1.0",
  "mode": "audit",
  "data": {
    "findings": [
      {
        "path": "config/service.py",
        "line": 3,
        "rule_id": "debug_enabled",
        "category": "config",
        "severity": "medium",
        "excerpt": "DEBUG = True",
        "recommendation": "Disable debug mode in production; it can expose stack traces and enable interactive code execution."
      },
      {
        "path": "config/service.py",
        "line": 4,
        "rule_id": "cors_wildcard",
        "category": "config",
        "severity": "medium",
        "excerpt": "HEADERS = {\"Access-Control-Allow-Origin\": \"*\"}",
        "recommendation": "Do not allow all origins with '*'; restrict CORS to an explicit allow-list of trusted origins."
      },
      {
        "path": "config/service.py",
        "line": 9,
        "rule_id": "weak_hash",
        "category": "crypto",
        "severity": "medium",
        "excerpt": "return hashlib.sha1(data).hexdigest()",
        "recommendation": "Use a strong algorithm (SHA-256+ for hashing, AES-GCM for encryption); avoid MD5, SHA-1, DES, and ECB mode."
      },
      {
        "path": "config/service.py",
        "line": 5,
        "rule_id": "bind_all_interfaces",
        "category": "config",
        "severity": "low",
        "excerpt": "HOST = \"0.0.0.0\"",
        "recommendation": "Binding to 0.0.0.0 exposes the service on all interfaces; bind to a specific interface or place it behind a firewall/proxy."
      }
    ],
    "summary": {
      "files_scanned": 2,
      "total": 4,
      "by_severity": {
        "high": 0,
        "medium": 3,
        "low": 1
      },
      "by_category": {
        "config": 3,
        "crypto": 1
      }
    },
    "verdict": "review"
  }
}
05 · RELIABILITY

Security boundaries & reliability

Clear limitations are part of a trustworthy security product.

RuntimePython ≥ 3.9stdlib only
NetworkNot requireddisabled
API KeysNot readnone
Filesystem writeNot requirednone
Analysisline-oriented regex heuristicshuman review
Known limitationfalse positives; not full SASTadvisory

Why is the result verifiable?

The rule set is fixed, execution is offline, the schema is stable, and each finding includes path and line evidence. The same input is repeatable. It does not perform deep inter-file dataflow, business-logic, or semantic analysis, so it should not replace a full SAST product or human security review.

dangerous_eval · Highshell_injection · Highunsafe_deserialization · Highsql_injection · Hightls_verification_disabled · Highweak_hash · Mediumdebug_enabled · Mediumcors_wildcard · Mediumbind_all_interfaces · Lowinsecure_random_for_token · Lowmissing_license · Low
06 · USERS

Built for practical review workflows

DevelopersQuickly catch common risky patterns before review.
Security engineersFront-load deterministic low-cost checks before deeper analysis.
Engineering teamsUse structured verdicts as a lightweight quality gate.
Agent / AI coding workflowsLocal callable tool with no network or API-key dependency.
CODE SECURITY AUDIT · v0.1.0

Put a lightweight security gate before the merge.

Useful for agent workflows, pre-review checks, teaching demos, and fast triage on small codebases.