mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
Tasks 1.1, 5.1, 5.2, 5.4 and the data half of 5.3. - mechanisms.toml: closed vocabulary v1 (20 ids) every expected row cites. - vibe-py: 35 Real-Vuln-Benchmark pairs (Apache-2.0), human provenance only because the LLM-generated repositories carry no license (escalated). - vfc-js: 17 Node fix-commit pairs harvested upstream (MIT/Apache-2.0), SecBench.js itself is not vendored (no license); sinks derived on 13/17. - agent-vfc: 29 agent-trailer fixes as catalog-candidates.toml plus REVIEW.md; the loaded catalog stays empty until a human reviews them. - datasets.toml and README document every slice and its review status. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
// Provenance: trackly-app/trackly-cli (vuln).
|
|
// repo: trackly-app/trackly-cli
|
|
// commit: 8d240ad8d7fc114c8f941ad956a2fdf32391ff60
|
|
// parent: 8d240ad8d7fc114c8f941ad956a2fdf32391ff60
|
|
// commit_url: https://github.com/trackly-app/trackly-cli/commit/1c1aed89b07edb04051830c8f086e02b65e961c6
|
|
// cve:
|
|
// license: MIT
|
|
// function: inspectExistingAncestor
|
|
// relpath: lib/path-diagnostics.js
|
|
// provenance: agent
|
|
// mechanism: path_join_user_input
|
|
|
|
async function inspectExistingAncestor(exactPath) {
|
|
let candidate = exactPath;
|
|
while (true) {
|
|
try {
|
|
const stats = await fs.stat(candidate);
|
|
return {
|
|
ancestor: candidate,
|
|
exactPathExists: candidate === exactPath,
|
|
exactPathType: candidate === exactPath ? (stats.isDirectory() ? 'directory' : 'file') : null,
|
|
writableDirectory: stats.isDirectory() ? candidate : path.dirname(candidate),
|
|
};
|
|
} catch (error) {
|
|
if (error.code !== 'ENOENT') throw error;
|
|
const parent = path.dirname(candidate);
|
|
if (parent === candidate) {
|
|
return { ancestor: parent, exactPathExists: false, exactPathType: null, writableDirectory: parent };
|
|
}
|
|
candidate = parent;
|
|
}
|
|
}
|
|
}
|