@danielszlaski/envguard 0.1.1 â 0.1.3
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 +30 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
# EnvGuard
|
|
1
|
+
# EnvGuard CLI
|
|
2
|
+
**Static Analysis for Environment Variables**
|
|
2
3
|
|
|
3
4
|
Keep your environment variables in sync with your codebase.
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
## The Problem
|
|
6
8
|
|
|
7
9
|
- `.env.example` is always out of sync with actual `.env`
|
|
@@ -42,31 +44,32 @@ envguard scan
|
|
|
42
44
|
Example output:
|
|
43
45
|
|
|
44
46
|
```
|
|
45
|
-
|
|
47
|
+
â Found 1 .env file(s) and 0 serverless.yml file(s)
|
|
48
|
+
|
|
49
|
+
Checking ./
|
|
50
|
+
|
|
51
|
+
Found 12 variable(s) used in this scope
|
|
52
|
+
Found 10 variable(s) in .env
|
|
53
|
+
Found 8 variable(s) in .env.example
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
55
|
+
â Missing from .env:
|
|
56
|
+
âĸ STRIPE_SECRET_KEY
|
|
57
|
+
Used in: src/payment.js, src/checkout.ts
|
|
58
|
+
âĸ API_KEY
|
|
59
|
+
Used in: src/api/client.ts
|
|
50
60
|
|
|
51
|
-
|
|
61
|
+
â Unused variables:
|
|
62
|
+
âĸ OLD_API_URL
|
|
52
63
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
2. API_KEY
|
|
57
|
-
Used in: src/api/client.ts
|
|
64
|
+
Missing from .env.example:
|
|
65
|
+
âĸ DATABASE_URL
|
|
66
|
+
âĸ JWT_SECRET
|
|
58
67
|
|
|
59
|
-
|
|
60
|
-
1. OLD_API_URL
|
|
61
|
-
Defined in .env but never used in code
|
|
68
|
+
ââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
1. DATABASE_URL
|
|
65
|
-
Used in: src/db/connection.ts
|
|
66
|
-
2. JWT_SECRET
|
|
67
|
-
Used in: src/auth/jwt.ts
|
|
70
|
+
â Total: 5 issue(s) across 1 location(s)
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
Run `envguard fix` to auto-generate .env.example
|
|
70
73
|
```
|
|
71
74
|
|
|
72
75
|
### Auto-generate .env.example
|
|
@@ -248,17 +251,17 @@ provider:
|
|
|
248
251
|
### Scan output for serverless.yml
|
|
249
252
|
|
|
250
253
|
```
|
|
251
|
-
|
|
254
|
+
Checking src/lambda/serverless.yml
|
|
252
255
|
|
|
253
256
|
Found 3 variable(s) in serverless.yml
|
|
254
257
|
Found 2 variable(s) used in code
|
|
255
258
|
|
|
256
|
-
|
|
257
|
-
|
|
259
|
+
â Unused variables in serverless.yml:
|
|
260
|
+
âĸ DATABASE_URL
|
|
258
261
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
+
â Missing from serverless.yml:
|
|
263
|
+
âĸ LOG_LEVEL
|
|
264
|
+
Used in: src/lambda/handler.js
|
|
262
265
|
```
|
|
263
266
|
|
|
264
267
|
### Key Features
|
|
@@ -296,7 +299,7 @@ envguard scan --strict
|
|
|
296
299
|
|
|
297
300
|
Example output (non-strict):
|
|
298
301
|
```
|
|
299
|
-
|
|
302
|
+
Skipped known runtime variables (use --strict to show):
|
|
300
303
|
Serverless Framework: IS_OFFLINE, SLS_OFFLINE
|
|
301
304
|
CI/CD: CI
|
|
302
305
|
AWS Lambda: AWS_REGION
|