Skip to content

Commit 5c64a63

Browse files
committed
Add .npmrc
1 parent 8ca10e4 commit 5c64a63

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
allow-build-scripts=@whiskeysockets/baileys,sharp,protobufjs

docs/configuration-files.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,27 @@ All these files work together to:
165165
- **Automate checks in CI/CD** (GitHub Actions)
166166

167167
This setup ensures txtcode maintains high code quality and security standards with minimal manual effort.
168+
169+
## Package Manager
170+
171+
### `.npmrc`
172+
173+
**Purpose:** Configuration for npm that controls package installation behavior.
174+
175+
**Setting:**
176+
```
177+
allow-build-scripts=@whiskeysockets/baileys,sharp,protobufjs
178+
```
179+
180+
**What it does:**
181+
- Explicitly allows only these specific packages to run build scripts during installation
182+
- Blocks all other packages from running scripts (security feature)
183+
184+
**Allowed packages:**
185+
- `@whiskeysockets/baileys` - WhatsApp library (compiles native dependencies)
186+
- `sharp` - Image processing (compiles native C++ code)
187+
- `protobufjs` - Protocol buffers (generates code)
188+
189+
**Why we need it:** Security protection against supply chain attacks. Prevents malicious packages from running arbitrary code during installation.
190+
191+
---

0 commit comments

Comments
 (0)