sec-gate 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/README.md +50 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -11,22 +11,56 @@ Supports **inline suppression** so developers can acknowledge known false positi
11
11
 
12
12
  ---
13
13
 
14
- ## Installone command, everything is set up automatically
14
+ ## Getting started developer setup
15
+
16
+ ### Step 1 — Install the tool globally (once per machine)
15
17
 
16
18
  ```bash
17
19
  npm install -g sec-gate
18
20
  ```
19
21
 
20
- That's it. This single command:
22
+ This single command installs the `sec-gate` CLI and automatically downloads **osv-scanner** and **govulncheck** for you. No separate tool installs needed.
23
+
24
+ > You only run this once per machine, not once per project.
25
+
26
+ ---
27
+
28
+ ### Step 2 — Connect it to your repo (once per cloned repo)
29
+
30
+ ```bash
31
+ cd your-project # go into the cloned repo root
32
+ sec-gate install # writes the pre-commit hook into .git/hooks/
33
+ ```
34
+
35
+ This tells Git to run `sec-gate scan` automatically before every commit in this repo.
36
+
37
+ > **You must run this in every repo you want protected.** The global install alone does not activate the hook anywhere — it just makes the `sec-gate` command available on your machine.
38
+
39
+ ---
40
+
41
+ ### Step 3 — Develop normally, commit as usual
42
+
43
+ ```bash
44
+ git add src/services/payment.js src/routes/user.js
45
+ git commit -m "feat: add payment service" # scan fires automatically here
46
+ ```
47
+
48
+ No extra commands. The hook handles everything.
21
49
 
22
- 1. Installs the `sec-gate` CLI globally
23
- 2. Downloads the **osv-scanner** binary for your OS automatically
24
- 3. Installs **govulncheck** via `go install` (if Go is available on your machine)
25
- 4. **Installs the pre-commit hook** in your current git repo automatically
50
+ ---
26
51
 
27
- No extra steps. No separate tool installs. Your next `git commit` is already security-checked.
52
+ ### Full example from scratch
28
53
 
29
- > **Note:** If you run `npm install -g sec-gate` from outside a git repo (e.g. your home directory), run `sec-gate install` once inside the repo afterwards.
54
+ ```bash
55
+ # On a fresh machine or a fresh clone:
56
+ npm install -g sec-gate # Step 1 — install tool globally (once per machine)
57
+ cd fmt-os # go into your project
58
+ sec-gate install # Step 2 — hook up this repo (once per clone)
59
+
60
+ # Now develop as normal:
61
+ git add .
62
+ git commit -m "my changes" # Step 3 — scan runs automatically here
63
+ ```
30
64
 
31
65
  ---
32
66
 
@@ -102,7 +136,7 @@ SEC_GATE_SKIP=1 git commit -m "emergency fix"
102
136
 
103
137
  ## Auto-setup for the whole team (optional but recommended)
104
138
 
105
- Add this to your **project's** `package.json` so every developer gets the hook automatically when they run `npm install`:
139
+ To avoid teammates forgetting `sec-gate install`, add this to your **project's** `package.json`:
106
140
 
107
141
  ```json
108
142
  "scripts": {
@@ -110,13 +144,17 @@ Add this to your **project's** `package.json` so every developer gets the hook a
110
144
  }
111
145
  ```
112
146
 
113
- Then the workflow for any new developer joining the team is:
147
+ Then the full onboarding flow for any new developer is just two commands:
114
148
 
115
149
  ```bash
116
- npm install -g sec-gate # global tool install (once per machine)
117
- npm install # prepare script auto-installs the hook
150
+ npm install -g sec-gate # Step 1 install tool globally (once per machine)
151
+ npm install # Step 2 — prepare script auto-runs sec-gate install
118
152
  ```
119
153
 
154
+ No need to remember `sec-gate install` separately — `npm install` handles it.
155
+
156
+ > Tip: document these two commands in your project's `CONTRIBUTING.md` so every new joiner knows the setup.
157
+
120
158
  ---
121
159
 
122
160
  ## GitHub Actions — CI gate + PR comments
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sec-gate",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Pre-commit security gate for OWASP Top 10 2021 — SAST, SCA and misconfig checks for Node/Express, Go and React codebases",
5
5
  "author": {
6
6
  "name": "Sundram Bhardwaj",