scriptguard 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](https://github.com/ferrierepete/scriptguard)
|
|
5
|
+
[](https://www.npmjs.com/package/scriptguard)
|
|
5
6
|
[](https://nodejs.org)
|
|
6
7
|
|
|
7
8
|
> **Security scanner for npm package lifecycle scripts** — detect malicious `postinstall`, `preinstall`, and `prepare` scripts before they run.
|
|
@@ -10,7 +11,13 @@ npm supply chain attacks often hide in lifecycle scripts — code that runs auto
|
|
|
10
11
|
|
|
11
12
|
## Install
|
|
12
13
|
|
|
13
|
-
### Option 1: Install from
|
|
14
|
+
### Option 1: Install from npm (recommended)
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g scriptguard
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Option 2: Install from source
|
|
14
21
|
|
|
15
22
|
```bash
|
|
16
23
|
# Clone the repository
|
|
@@ -27,7 +34,7 @@ npm run build
|
|
|
27
34
|
npm link
|
|
28
35
|
```
|
|
29
36
|
|
|
30
|
-
### Option
|
|
37
|
+
### Option 3: Run directly without installation
|
|
31
38
|
|
|
32
39
|
```bash
|
|
33
40
|
# Clone and run
|
|
@@ -38,15 +45,6 @@ npm run build
|
|
|
38
45
|
node dist/cli.js scan
|
|
39
46
|
```
|
|
40
47
|
|
|
41
|
-
### Option 3: Install via npm (coming soon)
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Package will be published to npm soon
|
|
45
|
-
npm install -g scriptguard
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
> **Note**: This project is currently in development. To use it today, install from source using Option 1 or Option 2.
|
|
49
|
-
|
|
50
48
|
## Usage
|
|
51
49
|
|
|
52
50
|
### Scan your project
|
|
@@ -150,27 +148,12 @@ ScriptGuard uses 26 detection patterns across 6 categories:
|
|
|
150
148
|
|
|
151
149
|
## CI/CD Integration
|
|
152
150
|
|
|
153
|
-
### When published to npm (coming soon)
|
|
154
|
-
|
|
155
151
|
```yaml
|
|
156
152
|
# GitHub Actions
|
|
157
153
|
- name: ScriptGuard Security Scan
|
|
158
154
|
run: npx scriptguard scan --fail-on high --format sarif > scriptguard-results.sarif
|
|
159
155
|
```
|
|
160
156
|
|
|
161
|
-
### Installing from source (current)
|
|
162
|
-
|
|
163
|
-
```yaml
|
|
164
|
-
# GitHub Actions
|
|
165
|
-
- name: ScriptGuard Security Scan
|
|
166
|
-
run: |
|
|
167
|
-
git clone https://github.com/ferrierepete/scriptguard.git
|
|
168
|
-
cd scriptguard
|
|
169
|
-
npm install
|
|
170
|
-
npm run build
|
|
171
|
-
node dist/cli.js scan --fail-on high --format sarif > scriptguard-results.sarif
|
|
172
|
-
```
|
|
173
|
-
|
|
174
157
|
## Programmatic API
|
|
175
158
|
|
|
176
159
|
```typescript
|
|
@@ -304,18 +287,8 @@ Use them together for comprehensive coverage.
|
|
|
304
287
|
**Absolutely.** Add ScriptGuard to your CI pipeline to catch supply chain attacks before they reach production:
|
|
305
288
|
|
|
306
289
|
```yaml
|
|
307
|
-
# When published to npm (coming soon)
|
|
308
290
|
- name: Run ScriptGuard
|
|
309
291
|
run: npx scriptguard scan --fail-on high
|
|
310
|
-
|
|
311
|
-
# Installing from source (current)
|
|
312
|
-
- name: Run ScriptGuard
|
|
313
|
-
run: |
|
|
314
|
-
git clone https://github.com/ferrierepete/scriptguard.git
|
|
315
|
-
cd scriptguard
|
|
316
|
-
npm install
|
|
317
|
-
npm run build
|
|
318
|
-
node dist/cli.js scan --fail-on high
|
|
319
292
|
```
|
|
320
293
|
|
|
321
294
|
## Troubleshooting
|
|
@@ -417,7 +390,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
|
|
|
417
390
|
- **GitHub Repository**: https://github.com/ferrierepete/scriptguard
|
|
418
391
|
- **Report Issues**: https://github.com/ferrierepete/scriptguard/issues
|
|
419
392
|
- **Discussions**: https://github.com/ferrierepete/scriptguard/discussions
|
|
420
|
-
- **npm Package
|
|
393
|
+
- **npm Package**: https://www.npmjs.com/package/scriptguard
|
|
421
394
|
|
|
422
395
|
## Related Tools
|
|
423
396
|
|
package/package.json
CHANGED