ShtukbaseStandard
файл пакета→ .shtukbase/packages/std-owasp-secrets/checks/scr01_known.ts

checks/scr01_known.ts

6 строк, 408 Б.

Файл как есть в пакете: код и комментарии в нём не переводятся.

  1. // SCR-R01: no secret of a known format (private keys, cloud and service tokens) in the files of the repository.
  2. import { lines, PKG, scanFiles } from './secretlib.ts';
  3. import { finish, norm } from './lib/std.ts';
  4. const n = norm(PKG, 'SCR-R01', 'enforce');
  5. finish(n, n.active ? lines(scanFiles('known'), 'remove from the file, revoke and issue a new one, keep in the environment or a secrets store') : []);