Skip to content

Commit 674f40b

Browse files
committed
Added test cases for make-dir package.
1 parent f02783a commit 674f40b

File tree

1 file changed

+11
-0
lines changed
  • javascript/ql/test/query-tests/Security/CWE-022/TaintedPath

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { makeDirectory, makeDirectorySync } from 'make-dir';
2+
3+
const express = require('express');
4+
const app = express();
5+
6+
app.get('/makedir', (req, res) => {
7+
const file = req.query.file; // $ MISSING: Source
8+
9+
makeDirectory(file); // $ MISSING: Alert
10+
makeDirectorySync(file); // $ MISSING: Alert
11+
});

0 commit comments

Comments
 (0)