Security Scan
Version: 1.0.0
Run the bundled scanner first, then manually validate anything high-signal before drawing conclusions.
Answer two questions:
- What third-party code or add-ons are present?
- Which files or package sources deserve closer review?
Quick Start
- Run
python3 scripts/security_scan.py <target-path>.
- Read
Findings by Severity and Flagged Files first, then use Third-Party Inventory to understand both manifests and lockfiles.
- Open the referenced files for any
high or medium issue.
- Describe findings as
flagged, suspicious, risky, or requires review.
- Do not call code or a package malicious without direct evidence.
What The Script Covers
Inventory these common ecosystems and add-on formats:
package.json dependencies and npm lifecycle scripts
package-lock.json, yarn.lock, and pnpm-lock.yaml
requirements*.txt and pyproject.toml
poetry.lock
Cargo.toml and Cargo.lock
Gemfile and Gemfile.lock
go.mod, composer.json, pom.xml, build.gradle*, and Package.swift
.csproj and packages.config
- Browser extension
manifest.json
- JetBrains
plugin.xml
- GitHub Actions workflow files in
.github/workflows/*.yml
Dockerfile*, docker-compose.yml, and compose.yaml
Flag these local risk indicators:
- Direct URL, Git, or repo-based dependency sources
- Lockfiles that resolve packages to direct tarballs, repositories, or other non-registry sources
- Suspicious install hooks like
preinstall or postinstall
- Shell pipelines that download and execute remote code
- Dynamic execution patterns like
eval, new Function, or subprocess spawning
- Large base64-like blobs in source
- Sensitive browser extension permissions such as
<all_urls>, debugger, nativeMessaging, or proxy
- GitHub Actions that use third-party actions without a full commit SHA pin
- Docker and Compose configurations that use floating base images, remote
ADD, privileged mode, host namespaces, root users, or dangerous host mounts
Expected Workflow
1. Run the local scan
Prefer text output:
python3 scripts/security_scan.py <target-path>
Use JSON only when another tool will consume the results:
python3 scripts/security_scan.py <target-path> --format json
2. Validate high-signal findings
For each high or medium finding:
- Open the referenced file.
- Confirm the pattern is real and not benign test data.
- Explain why it matters in plain language.
- State what additional review is still needed if certainty is limited.
3. Deliver a careful report
Always include:
- The list of directories scanned
- The flagged files, with why they were flagged
- The full file list
- Each noteworthy finding attached to the file where it was found
- A concise inventory of third-party components
- A short note on scan limits
Response Template
Use this structure when summarizing results:
Directories scanned
- <directory>
Flagged files
- <file>: <severity> <issue>
Files scanned
- <file>: OK
- <file>: <severity> <issue>
Third-party inventory
- <component>: <ecosystem/type>, version/source, where it was found
Limits
- This is a local heuristic scan. It can identify risky patterns, but it cannot prove a package is malicious without stronger evidence.
When To Go Beyond The Script
Inspect files manually when:
- The project uses an unsupported dependency format
- The scanner flags lifecycle scripts or extension permissions
- The code downloads executables, runs shell commands, or decodes hidden payloads
- The user specifically asks whether a package is known to be malicious
If browsing is available and the user wants deeper verification, confirm package ownership and advisories through official registries, vendor docs, and the source repository.
1---
2name: security-scan-3
3description: Scan a local code or plugin directory for third-party dependencies, lockfiles, extensions, workflow actions, container definitions, risky install hooks, suspicious code patterns, and unusually powerful permissions. Use when the user wants a security-oriented pass over a repository, generated app, browser extension, IDE plugin, CI workflow, Docker setup, or other development folder to identify what is installed and what deserves deeper review.
4metadata:
5 source: https://skillmd.com/skills/aibot88/security-scan-3
6---
7
8# Security Scan
9
10Version: `1.0.0`
11
12Run the bundled scanner first, then manually validate anything high-signal before drawing conclusions.
13
14Answer two questions:
15
161. What third-party code or add-ons are present?
172. Which files or package sources deserve closer review?
18
19## Quick Start
20
211. Run `python3 scripts/security_scan.py <target-path>`.
222. Read `Findings by Severity` and `Flagged Files` first, then use `Third-Party Inventory` to understand both manifests and lockfiles.
233. Open the referenced files for any `high` or `medium` issue.
244. Describe findings as `flagged`, `suspicious`, `risky`, or `requires review`.
255. Do not call code or a package malicious without direct evidence.
26
27## What The Script Covers
28
29Inventory these common ecosystems and add-on formats:
30
31- `package.json` dependencies and npm lifecycle scripts
32- `package-lock.json`, `yarn.lock`, and `pnpm-lock.yaml`
33- `requirements*.txt` and `pyproject.toml`
34- `poetry.lock`
35- `Cargo.toml` and `Cargo.lock`
36- `Gemfile` and `Gemfile.lock`
37- `go.mod`, `composer.json`, `pom.xml`, `build.gradle*`, and `Package.swift`
38- `.csproj` and `packages.config`
39- Browser extension `manifest.json`
40- JetBrains `plugin.xml`
41- GitHub Actions workflow files in `.github/workflows/*.yml`
42- `Dockerfile*`, `docker-compose.yml`, and `compose.yaml`
43
44Flag these local risk indicators:
45
46- Direct URL, Git, or repo-based dependency sources
47- Lockfiles that resolve packages to direct tarballs, repositories, or other non-registry sources
48- Suspicious install hooks like `preinstall` or `postinstall`
49- Shell pipelines that download and execute remote code
50- Dynamic execution patterns like `eval`, `new Function`, or subprocess spawning
51- Large base64-like blobs in source
52- Sensitive browser extension permissions such as `<all_urls>`, `debugger`, `nativeMessaging`, or `proxy`
53- GitHub Actions that use third-party actions without a full commit SHA pin
54- Docker and Compose configurations that use floating base images, remote `ADD`, privileged mode, host namespaces, root users, or dangerous host mounts
55
56## Expected Workflow
57
58### 1. Run the local scan
59
60Prefer text output:
61
62```bash
63python3 scripts/security_scan.py <target-path>
64```
65
66Use JSON only when another tool will consume the results:
67
68```bash
69python3 scripts/security_scan.py <target-path> --format json
70```
71
72### 2. Validate high-signal findings
73
74For each `high` or `medium` finding:
75
76- Open the referenced file.
77- Confirm the pattern is real and not benign test data.
78- Explain why it matters in plain language.
79- State what additional review is still needed if certainty is limited.
80
81### 3. Deliver a careful report
82
83Always include:
84
85- The list of directories scanned
86- The flagged files, with why they were flagged
87- The full file list
88- Each noteworthy finding attached to the file where it was found
89- A concise inventory of third-party components
90- A short note on scan limits
91
92## Response Template
93
94Use this structure when summarizing results:
95
96```markdown
97Directories scanned
98- <directory>
99
100Flagged files
101- <file>: <severity> <issue>
102
103Files scanned
104- <file>: OK
105- <file>: <severity> <issue>
106
107Third-party inventory
108- <component>: <ecosystem/type>, version/source, where it was found
109
110Limits
111- This is a local heuristic scan. It can identify risky patterns, but it cannot prove a package is malicious without stronger evidence.
112```
113
114## When To Go Beyond The Script
115
116Inspect files manually when:
117
118- The project uses an unsupported dependency format
119- The scanner flags lifecycle scripts or extension permissions
120- The code downloads executables, runs shell commands, or decodes hidden payloads
121- The user specifically asks whether a package is known to be malicious
122
123If browsing is available and the user wants deeper verification, confirm package ownership and advisories through official registries, vendor docs, and the source repository.