файл пакета→ .shtukbase/packages/std-owasp-secrets/checks/scr02_likely.ts
checks/scr02_likely.ts
6 строк, 431 Б.
Файл как есть в пакете: код и комментарии в нём не переводятся.
- // SCR-R02 (observe): likely secrets — a quoted high-entropy value under a secret-like name, a password in a URL, a JWT.
- import { lines, PKG, scanFiles } from './secretlib.ts';
- import { finish, norm } from './lib/std.ts';
- const n = norm(PKG, 'SCR-R02', 'observe');
- finish(n, n.active ? lines(scanFiles('likely'), 'if it is a secret — move it to the environment and revoke it; if not — mark the line "secrets:allow"') : []);