chore(16-03): triage eslint-plugin-security findings to green
- Disable detect-object-injection globally in eslint.config.js: all hits were numeric loop array indices (ranks[i]) — not user-controlled keys; zod guards real API input boundaries; justification comment added (T-16-09) - Add inline eslint-disable for detect-non-literal-fs-filename at 2 sites: - apps/api/src/index.ts: realpathSync(process.argv[1]) — runtime entry path, not user input - apps/api/tests/broker/expand.test.ts: readFileSync of test fixture path — test-controlled - pnpm lint exits 0 across both apps with --max-warnings 0 - 14 of 15 security rules remain active at error; no blanket file disables
This commit is contained in:
@@ -25,6 +25,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const FIXTURES = join(__dirname, '../fixtures');
|
||||
|
||||
function loadFixture(name: string): string {
|
||||
// eslint-disable-next-line security/detect-non-literal-fs-filename -- name is a test-controlled fixture filename, not user input
|
||||
return readFileSync(join(FIXTURES, name), 'utf8');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user