ShtukbaseStandard
archivo del paquete→ .shtukbase/packages/std-owasp-secrets/checks/scr01_known.ts

checks/scr01_known.ts

6 líneas, 408 B.

El archivo tal como está en el paquete: el código y sus comentarios no se traducen.

  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') : []);