{"record":{"id":"cd1eebcaefa2feaf","repo":"NationalSecurityAgency/ghidra","slug":"missing-directory-containing-signature-files","errorCode":null,"errorMessage":"Missing directory containing signature files","messagePattern":"Missing directory containing signature files","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java","lineNumber":677,"sourceCode":"\t\t\t}\n\t\t}\n\t}\n\n\tprivate File checkDirectory(String dirPath) throws IOException {\n\t\tFile dir = new File(dirPath);\n\t\tif (!dir.exists()) {\n\t\t\tthrow new IOException(\"Commit directory does not exist: \" + dirPath);\n\t\t}\n\t\tif (!dir.isDirectory()) {\n\t\t\tthrow new IOException(dirPath + \": is not a directory\");\n\t\t}\n\t\treturn dir.getCanonicalFile();\n\t}\n\n\tprivate void doCommitSigs(List<String> params, TaskMonitor monitor)\n\t\t\tthrows IOException, SAXException, LSHException, CancelledException {\n\t\tif (params.size() < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Missing directory containing signature files\");\n\t\t}\n\n\t\tString xmlDirectory = params.get(0);\n\n\t\tFile dir = checkDirectory(xmlDirectory);\n\n\t\tboolean hasOverride = optionValueMap.containsKey(OVERRIDE_OPTION);\n\t\tString md5Filter = optionValueMap.get(MD5_OPTION);\n\n\t\ttry (BulkSignatures bsim = getBulkSignatures()) {\n\t\t\tbsim.sendXmlToQueryServer(dir, hasOverride ? ghidraURL : null, md5Filter, monitor);\n\t\t}\n\t}\n\n\tprivate void doCommitUpdates(List<String> params)\n\t\t\tthrows IOException, SAXException, LSHException {\n\t\tif (params.size() < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Missing directory containing update files\");","sourceCodeStart":659,"sourceCodeEnd":695,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java#L659-L695","documentation":"Thrown by doCommitSigs() when no positional directory argument is supplied. commitsigs requires the path to a directory containing previously generated signature XML files (the output of generatesigs). The commit step sends those files to the BSim query server, so without a source directory there is nothing to commit.","triggerScenarios":"Running 'bsim commitsigs <bsimURL>' with no positional argument. params.size() < 1 at line 676.","commonSituations":"Forgetting the directory; assuming commitsigs will auto-discover the generatesigs output location; scripting a pipeline and omitting the variable.","solutions":["Supply the XML directory: commitsigs <bsimURL> </xmldirectory>.","Check the usage at line 1036: commitsigs <bsimURL> </xmldirectory> [--md5 <hash>] [--override <ghidraURL>]."],"exampleFix":"// before\nbsim commitsigs postgresql://myhost/BsimDB\n// after\nbsim commitsigs postgresql://myhost/BsimDB /tmp/xmlout","handlingStrategy":"validation","validationCode":"// commitsigs requires a positional directory\nif (\"commitsigs\".equals(command) && positionalParams.isEmpty()) {\n    throw new IllegalArgumentException(\"commitsigs requires the XML directory argument\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Parameterize commit scripts so the directory variable is never empty.","Validate argc before exec in shell wrappers."],"tags":["cli","argument-validation","bsim","commitsigs"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}