JS: Do simple modeling of process.stdin as threat-model source

This commit is contained in:
Rasmus Wriedt Larsen
2024-10-31 14:24:27 +01:00
parent 34b86c39c1
commit eca8bf5a35
2 changed files with 6 additions and 4 deletions

View File

@@ -94,12 +94,12 @@ rl_file.on("line", (line) => {
// ------ reading from stdin ------
// Accessing stdin using process.stdin
process.stdin.on('data', (data) => { // $ MISSING: threat-source=stdin
SINK(data); // $ MISSING: hasFlow
process.stdin.on('data', (data) => { // $ threat-source=stdin
SINK(data); // $ hasFlow
});
const stdin_line = process.stdin.read(); // $ MISSING: threat-source=stdin
SINK(stdin_line); // $ MISSING: hasFlow
const stdin_line = process.stdin.read(); // $ threat-source=stdin
SINK(stdin_line); // $ hasFlow
// Accessing stdin using readline
const readline = require('readline');