Severity: High
Metric: Supply Chain Risk — Current: 7/10 → After Fix: 2/10 | 71% risk reduction
File: codegen scripts (ts-morph@27.0.2 consuming @grom.js/bot-api-spec)
Issue
Bot API bindings are generated via ts-morph from @grom.js/bot-api-spec. If this package uses a range specifier (^ or ~) rather than an exact version pin, a compromised or accidentally broken publish of the spec automatically propagates into generated bindings the next time codegen runs — affecting all downstream library consumers.
Suggested fix
- Pin
@grom.js/bot-api-spec to an exact version (no ^ or ~).
- Commit a SHA-256 hash of the expected generated output:
sha256sum src/generated/bot-api.ts > codegen/output.sha256
- Fail CI if the hash changes unexpectedly:
sha256sum --check codegen/output.sha256
- Add CODEOWNERS rule requiring maintainer review on any change to generated files.
This issue was identified by agentic audit tool. If this doesn't apply to your project, feel free to close it.