NationalSecurityAgency/ghidra · error · IllegalArgumentException
Missing directory containing signature files
Error message
Missing directory containing signature files
What it means
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.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:677
}
}
}
private File checkDirectory(String dirPath) throws IOException {
File dir = new File(dirPath);
if (!dir.exists()) {
throw new IOException("Commit directory does not exist: " + dirPath);
}
if (!dir.isDirectory()) {
throw new IOException(dirPath + ": is not a directory");
}
return dir.getCanonicalFile();
}
private void doCommitSigs(List<String> params, TaskMonitor monitor)
throws IOException, SAXException, LSHException, CancelledException {
if (params.size() < 1) {
throw new IllegalArgumentException("Missing directory containing signature files");
}
String xmlDirectory = params.get(0);
File dir = checkDirectory(xmlDirectory);
boolean hasOverride = optionValueMap.containsKey(OVERRIDE_OPTION);
String md5Filter = optionValueMap.get(MD5_OPTION);
try (BulkSignatures bsim = getBulkSignatures()) {
bsim.sendXmlToQueryServer(dir, hasOverride ? ghidraURL : null, md5Filter, monitor);
}
}
private void doCommitUpdates(List<String> params)
throws IOException, SAXException, LSHException {
if (params.size() < 1) {
throw new IllegalArgumentException("Missing directory containing update files");View on GitHub (pinned to d5f144c24d)
Solutions
- Supply the XML directory: commitsigs <bsimURL> </xmldirectory>.
- Check the usage at line 1036: commitsigs <bsimURL> </xmldirectory> [--md5 <hash>] [--override <ghidraURL>].
Example fix
// before bsim commitsigs postgresql://myhost/BsimDB // after bsim commitsigs postgresql://myhost/BsimDB /tmp/xmlout
Defensive patterns
Strategy: validation
Validate before calling
// commitsigs requires a positional directory
if ("commitsigs".equals(command) && positionalParams.isEmpty()) {
throw new IllegalArgumentException("commitsigs requires the XML directory argument");
} Prevention
- Parameterize commit scripts so the directory variable is never empty.
- Validate argc before exec in shell wrappers.
When it happens
Trigger: Running 'bsim commitsigs <bsimURL>' with no positional argument. params.size() < 1 at line 676.
Common situations: Forgetting the directory; assuming commitsigs will auto-discover the generatesigs output location; scripting a pipeline and omitting the variable.
Related errors
- Unknown command: {}
- Unsupported command: {}
- Unsupported option use: {}
- Unexpected argument: {}
- Unsupported option specification: {}=
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/cd1eebcaefa2feaf.
Report an issue: GitHub.