Package org.egothor.methodatlas
Record Class CliConfig
java.lang.Object
java.lang.Record
org.egothor.methodatlas.CliConfig
- Record Components:
outputMode- selected output modeaiOptions- AI configuration controlling provider selection, taxonomy, limits, and timeoutspaths- root paths to scan; when empty, the current working directory is scannedfileSuffixes- one or more filename suffixes used to select source files for scanning; a file is included if its name ends with any of the listed suffixestestMarkers- language-neutral identifiers that mark test methods; for JVM providers these are annotation simple names (e.g."Test","ParameterizedTest"); for .NET providers they are attribute names; TypeScript providers typically ignore this and use function names viapropertiesinstead; when empty, eachTestDiscoveryprovider falls back to its own built-in defaultsproperties- plugin-specific key/multi-value pairs forwarded verbatim to eachTestDiscoveryprovider; providers ignore keys they do not recogniseemitMetadata- whether to emit# key: valuemetadata comment lines before the CSV headermanualMode- manual AI workflow mode, ornullwhen using automated providersapplyTags- whentrue, AI-generated@DisplayNameand@Tagannotations are written back to the source files instead of producing a CSV/SARIF reportcontentHash- whentrue, a SHA-256 fingerprint of each class source is included as acontent_hashcolumn in CSV/plain output and as a SARIF propertyoverrideFile- path to a YAML classification override file, ornullwhen no override file is configured; overrides are applied after AI classification (or in place of it in static mode) and persist human corrections across re-runssecurityOnly- whentrue, only methods classified as security-relevant (via AI or override) are emitted; methods without an AI suggestion or whose suggestion hassecurityRelevant=falseare silently dropped from the output; this flag is set automatically whenOutputMode.SARIFis selected unless-include-non-securityis supplied, because SARIF is consumed by security tooling that expects findings, not a full inventoryaiCacheFile- path to a MethodAtlas CSV produced by a previous scan with-content-hash -ai; when present, classes whosecontent_hashmatches an entry in that file are classified from the cache instead of calling the AI provider;nullwhen no cache is configureddriftDetect- whentrue, atag_ai_driftcolumn is added to CSV/plain output comparing the source-level@Tag("security")annotation against the AI security-relevance classification; values arenone,tag-only, orai-only; SARIF and GitHub Annotations always include drift when AI is enabled regardless of this flagapplyTagsFromCsvFile- path to a CSV file used as input for the-apply-tags-from-csvmode;nullwhen the mode is not activemismatchLimit- maximum number of mismatches allowed before the apply-tags-from-csv operation is aborted;-1means no limit is enforcedemitSourceRoot- whentrue, asource_rootcolumn is added to CSV/plain output identifying which scan root each record originated from; useful in multi-root projects; has no effect on SARIF or annotations outputsarifOmitScores- whentrue, the interaction score and confidence percentage are omitted from SARIF result message text; use this when the consuming system already renders thepropertiesbag; default isfalse(scores are embedded in messages)minConfidence- minimum AI confidence score (inclusive) for a method to be emitted; only meaningful when-ai-confidenceis enabled; the default0.0disables the filter entirelyemitReceipt- whentrue, a reproducibility receipt JSON file is written after a successful scan capturing the SHA-256 of every input that influenced the resultreceiptFile- target path for the reproducibility receipt; whennull, the defaultmethodatlas-receipt.jsonin the current working directory is used; only honoured whenemitReceiptistrueemitCoverage- whentrue, a control-coverage matrix is produced after the scan from the mapping supplied viacoverageMappingFilecoverageFile- target path for the coverage matrix JSON; whennull, the defaultcontrols-coverage.jsonin the current working directory is used; only honoured whenemitCoverageistruecoverageMappingFile- user-authored tag→control mapping JSON file; required whenemitCoverageistrueevidencePackFramework- target compliance framework token supplied to-evidence-pack;nullwhen the evidence-pack mode is not activeevidencePackDir- output directory for the evidence pack;nullmeans use the default (under the first scan root)evidencePackOverwrite- whentrue, an existing evidence-pack directory is reused; whenfalse, a pre-existing directory is treated as an errorevidencePackKeyringFile- ZeroEcho keyring file providing the manifest signing key (a plaintextKeyringStore, not a JDK PKCS12 keystore);nullproduces an unsigned pack with a stderr warning; intended for CLI use with a permission-protected fileevidencePackKeyringEnv- name of an environment variable holding the full keyring content, ornull; intended for CI/CD where the keyring is delivered through a platform secret and parsed in memory so the private key never touches the runner's disk; takes precedence overevidencePackKeyringFileevidencePackKeyAlias- keyring alias of the signing key;nulluses the first alias; for hybrid signing the format is"classic/pqc"evidencePackSignAlgo- ZeroEcho signature algorithm identifier;nullderives the algorithm from the keyring entry (Ed25519 when MethodAtlas-generated); a"classic+pqc"value triggers hybrid modeverbose- whentrue, emit detailed diagnostics to the progress writer; consumed by-apply-tags-from-csvto diagnose zero-update runspromoteAi- risky, not recommended: whentrue,-apply-tags-from-csvfills a method's blanktags/display_namefrom the AI columns, writing unvalidated AI output into source; off by default (see the engine and YAML docs for the full warning)detectSecrets- whentrue, enable credential detection alongside the test scansecretsInclude- glob overriding the default file mask;nulluses the defaultsecretsRules- custom rule catalog YAML;nulluses the built-in catalogsecretsOut- output path for the secrets CSV; defaultmethodatlas-credentials.csvsecretsSeparateLlm- whentrue, force a standalone triage LLM callsecretsShowValues- whentrue, print unmasked secret values (default: redacted)secretsErrorThreshold- SARIFerrorscore floor (default0.8)secretsWarningThreshold- SARIFwarningscore floor (default0.4)secretsMinScore- suppress findings below this score (default0.0= keep all)aiCacheOut- path to write the unified AI result cache (JSON Lines) after the scan, ornullto write none; pair withaiCacheFilepointing at the same path for an incremental read-update cache
public record CliConfig(org.egothor.methodatlas.emit.OutputMode outputMode, org.egothor.methodatlas.ai.AiOptions aiOptions, List<Path> paths, List<String> fileSuffixes, Set<String> testMarkers, Map<String,List<String>> properties, boolean emitMetadata, ManualMode manualMode, boolean applyTags, boolean contentHash, Path overrideFile, boolean securityOnly, Path aiCacheFile, boolean driftDetect, Path applyTagsFromCsvFile, int mismatchLimit, boolean emitSourceRoot, boolean sarifOmitScores, double minConfidence, boolean emitReceipt, Path receiptFile, boolean emitCoverage, Path coverageFile, Path coverageMappingFile, String evidencePackFramework, Path evidencePackDir, boolean evidencePackOverwrite, Path evidencePackKeyringFile, String evidencePackKeyringEnv, String evidencePackKeyAlias, String evidencePackSignAlgo, boolean verbose, boolean promoteAi, boolean detectSecrets, String secretsInclude, Path secretsRules, Path secretsOut, boolean secretsSeparateLlm, boolean secretsShowValues, double secretsErrorThreshold, double secretsWarningThreshold, double secretsMinScore, Path aiCacheOut)
extends Record
Parsed command-line configuration used to drive a single application run.
Instances are created by CliArgs.parse(String...) and consumed by
MethodAtlasApp.run(String[], java.io.PrintWriter).
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCliConfig(org.egothor.methodatlas.emit.OutputMode outputMode, org.egothor.methodatlas.ai.AiOptions aiOptions, List<Path> paths, List<String> fileSuffixes, Set<String> testMarkers, Map<String, List<String>> properties, boolean emitMetadata, ManualMode manualMode, boolean applyTags, boolean contentHash, Path overrideFile, boolean securityOnly, Path aiCacheFile, boolean driftDetect, Path applyTagsFromCsvFile, int mismatchLimit, boolean emitSourceRoot, boolean sarifOmitScores, double minConfidence, boolean emitReceipt, Path receiptFile, boolean emitCoverage, Path coverageFile, Path coverageMappingFile, String evidencePackFramework, Path evidencePackDir, boolean evidencePackOverwrite, Path evidencePackKeyringFile, String evidencePackKeyringEnv, String evidencePackKeyAlias, String evidencePackSignAlgo, boolean verbose, boolean promoteAi, boolean detectSecrets, String secretsInclude, Path secretsRules, Path secretsOut, boolean secretsSeparateLlm, boolean secretsShowValues, double secretsErrorThreshold, double secretsWarningThreshold, double secretsMinScore, Path aiCacheOut) Creates an instance of aCliConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaiCacheFilerecord component.Returns the value of theaiCacheOutrecord component.org.egothor.methodatlas.ai.AiOptionsReturns the value of theaiOptionsrecord component.booleanReturns the value of theapplyTagsrecord component.Returns the value of theapplyTagsFromCsvFilerecord component.booleanReturns the value of thecontentHashrecord component.Returns the value of thecoverageFilerecord component.Returns the value of thecoverageMappingFilerecord component.booleanReturns the value of thedetectSecretsrecord component.booleanReturns the value of thedriftDetectrecord component.booleanReturns the value of theemitCoveragerecord component.booleanReturns the value of theemitMetadatarecord component.booleanReturns the value of theemitReceiptrecord component.booleanReturns the value of theemitSourceRootrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevidencePackDirrecord component.Returns the value of theevidencePackFrameworkrecord component.Returns the value of theevidencePackKeyAliasrecord component.Returns the value of theevidencePackKeyringEnvrecord component.Returns the value of theevidencePackKeyringFilerecord component.booleanReturns the value of theevidencePackOverwriterecord component.Returns the value of theevidencePackSignAlgorecord component.Returns the value of thefileSuffixesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themanualModerecord component.doubleReturns the value of theminConfidencerecord component.intReturns the value of themismatchLimitrecord component.org.egothor.methodatlas.emit.OutputModeReturns the value of theoutputModerecord component.Returns the value of theoverrideFilerecord component.paths()Returns the value of thepathsrecord component.booleanReturns the value of thepromoteAirecord component.Returns the value of thepropertiesrecord component.Returns the value of thereceiptFilerecord component.booleanReturns the value of thesarifOmitScoresrecord component.doubleReturns the value of thesecretsErrorThresholdrecord component.Returns the value of thesecretsIncluderecord component.doubleReturns the value of thesecretsMinScorerecord component.Returns the value of thesecretsOutrecord component.Returns the value of thesecretsRulesrecord component.booleanReturns the value of thesecretsSeparateLlmrecord component.booleanReturns the value of thesecretsShowValuesrecord component.doubleReturns the value of thesecretsWarningThresholdrecord component.booleanReturns the value of thesecurityOnlyrecord component.Returns the value of thetestMarkersrecord component.final StringtoString()Returns a string representation of this record class.booleanverbose()Returns the value of theverboserecord component.
-
Constructor Details
-
CliConfig
public CliConfig(org.egothor.methodatlas.emit.OutputMode outputMode, org.egothor.methodatlas.ai.AiOptions aiOptions, List<Path> paths, List<String> fileSuffixes, Set<String> testMarkers, Map<String, List<String>> properties, boolean emitMetadata, ManualMode manualMode, boolean applyTags, boolean contentHash, Path overrideFile, boolean securityOnly, Path aiCacheFile, boolean driftDetect, Path applyTagsFromCsvFile, int mismatchLimit, boolean emitSourceRoot, boolean sarifOmitScores, double minConfidence, boolean emitReceipt, Path receiptFile, boolean emitCoverage, Path coverageFile, Path coverageMappingFile, String evidencePackFramework, Path evidencePackDir, boolean evidencePackOverwrite, Path evidencePackKeyringFile, String evidencePackKeyringEnv, String evidencePackKeyAlias, String evidencePackSignAlgo, boolean verbose, boolean promoteAi, boolean detectSecrets, String secretsInclude, Path secretsRules, Path secretsOut, boolean secretsSeparateLlm, boolean secretsShowValues, double secretsErrorThreshold, double secretsWarningThreshold, double secretsMinScore, Path aiCacheOut) Creates an instance of aCliConfigrecord class.- Parameters:
outputMode- the value for theoutputModerecord componentaiOptions- the value for theaiOptionsrecord componentpaths- the value for thepathsrecord componentfileSuffixes- the value for thefileSuffixesrecord componenttestMarkers- the value for thetestMarkersrecord componentproperties- the value for thepropertiesrecord componentemitMetadata- the value for theemitMetadatarecord componentmanualMode- the value for themanualModerecord componentapplyTags- the value for theapplyTagsrecord componentcontentHash- the value for thecontentHashrecord componentoverrideFile- the value for theoverrideFilerecord componentsecurityOnly- the value for thesecurityOnlyrecord componentaiCacheFile- the value for theaiCacheFilerecord componentdriftDetect- the value for thedriftDetectrecord componentapplyTagsFromCsvFile- the value for theapplyTagsFromCsvFilerecord componentmismatchLimit- the value for themismatchLimitrecord componentemitSourceRoot- the value for theemitSourceRootrecord componentsarifOmitScores- the value for thesarifOmitScoresrecord componentminConfidence- the value for theminConfidencerecord componentemitReceipt- the value for theemitReceiptrecord componentreceiptFile- the value for thereceiptFilerecord componentemitCoverage- the value for theemitCoveragerecord componentcoverageFile- the value for thecoverageFilerecord componentcoverageMappingFile- the value for thecoverageMappingFilerecord componentevidencePackFramework- the value for theevidencePackFrameworkrecord componentevidencePackDir- the value for theevidencePackDirrecord componentevidencePackOverwrite- the value for theevidencePackOverwriterecord componentevidencePackKeyringFile- the value for theevidencePackKeyringFilerecord componentevidencePackKeyringEnv- the value for theevidencePackKeyringEnvrecord componentevidencePackKeyAlias- the value for theevidencePackKeyAliasrecord componentevidencePackSignAlgo- the value for theevidencePackSignAlgorecord componentverbose- the value for theverboserecord componentpromoteAi- the value for thepromoteAirecord componentdetectSecrets- the value for thedetectSecretsrecord componentsecretsInclude- the value for thesecretsIncluderecord componentsecretsRules- the value for thesecretsRulesrecord componentsecretsOut- the value for thesecretsOutrecord componentsecretsSeparateLlm- the value for thesecretsSeparateLlmrecord componentsecretsShowValues- the value for thesecretsShowValuesrecord componentsecretsErrorThreshold- the value for thesecretsErrorThresholdrecord componentsecretsWarningThreshold- the value for thesecretsWarningThresholdrecord componentsecretsMinScore- the value for thesecretsMinScorerecord componentaiCacheOut- the value for theaiCacheOutrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
outputMode
public org.egothor.methodatlas.emit.OutputMode outputMode()Returns the value of theoutputModerecord component.- Returns:
- the value of the
outputModerecord component
-
aiOptions
public org.egothor.methodatlas.ai.AiOptions aiOptions()Returns the value of theaiOptionsrecord component.- Returns:
- the value of the
aiOptionsrecord component
-
paths
Returns the value of thepathsrecord component.- Returns:
- the value of the
pathsrecord component
-
fileSuffixes
Returns the value of thefileSuffixesrecord component.- Returns:
- the value of the
fileSuffixesrecord component
-
testMarkers
Returns the value of thetestMarkersrecord component.- Returns:
- the value of the
testMarkersrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
emitMetadata
public boolean emitMetadata()Returns the value of theemitMetadatarecord component.- Returns:
- the value of the
emitMetadatarecord component
-
manualMode
Returns the value of themanualModerecord component.- Returns:
- the value of the
manualModerecord component
-
applyTags
public boolean applyTags()Returns the value of theapplyTagsrecord component.- Returns:
- the value of the
applyTagsrecord component
-
contentHash
public boolean contentHash()Returns the value of thecontentHashrecord component.- Returns:
- the value of the
contentHashrecord component
-
overrideFile
Returns the value of theoverrideFilerecord component.- Returns:
- the value of the
overrideFilerecord component
-
securityOnly
public boolean securityOnly()Returns the value of thesecurityOnlyrecord component.- Returns:
- the value of the
securityOnlyrecord component
-
aiCacheFile
Returns the value of theaiCacheFilerecord component.- Returns:
- the value of the
aiCacheFilerecord component
-
driftDetect
public boolean driftDetect()Returns the value of thedriftDetectrecord component.- Returns:
- the value of the
driftDetectrecord component
-
applyTagsFromCsvFile
Returns the value of theapplyTagsFromCsvFilerecord component.- Returns:
- the value of the
applyTagsFromCsvFilerecord component
-
mismatchLimit
public int mismatchLimit()Returns the value of themismatchLimitrecord component.- Returns:
- the value of the
mismatchLimitrecord component
-
emitSourceRoot
public boolean emitSourceRoot()Returns the value of theemitSourceRootrecord component.- Returns:
- the value of the
emitSourceRootrecord component
-
sarifOmitScores
public boolean sarifOmitScores()Returns the value of thesarifOmitScoresrecord component.- Returns:
- the value of the
sarifOmitScoresrecord component
-
minConfidence
public double minConfidence()Returns the value of theminConfidencerecord component.- Returns:
- the value of the
minConfidencerecord component
-
emitReceipt
public boolean emitReceipt()Returns the value of theemitReceiptrecord component.- Returns:
- the value of the
emitReceiptrecord component
-
receiptFile
Returns the value of thereceiptFilerecord component.- Returns:
- the value of the
receiptFilerecord component
-
emitCoverage
public boolean emitCoverage()Returns the value of theemitCoveragerecord component.- Returns:
- the value of the
emitCoveragerecord component
-
coverageFile
Returns the value of thecoverageFilerecord component.- Returns:
- the value of the
coverageFilerecord component
-
coverageMappingFile
Returns the value of thecoverageMappingFilerecord component.- Returns:
- the value of the
coverageMappingFilerecord component
-
evidencePackFramework
Returns the value of theevidencePackFrameworkrecord component.- Returns:
- the value of the
evidencePackFrameworkrecord component
-
evidencePackDir
Returns the value of theevidencePackDirrecord component.- Returns:
- the value of the
evidencePackDirrecord component
-
evidencePackOverwrite
public boolean evidencePackOverwrite()Returns the value of theevidencePackOverwriterecord component.- Returns:
- the value of the
evidencePackOverwriterecord component
-
evidencePackKeyringFile
Returns the value of theevidencePackKeyringFilerecord component.- Returns:
- the value of the
evidencePackKeyringFilerecord component
-
evidencePackKeyringEnv
Returns the value of theevidencePackKeyringEnvrecord component.- Returns:
- the value of the
evidencePackKeyringEnvrecord component
-
evidencePackKeyAlias
Returns the value of theevidencePackKeyAliasrecord component.- Returns:
- the value of the
evidencePackKeyAliasrecord component
-
evidencePackSignAlgo
Returns the value of theevidencePackSignAlgorecord component.- Returns:
- the value of the
evidencePackSignAlgorecord component
-
verbose
public boolean verbose()Returns the value of theverboserecord component.- Returns:
- the value of the
verboserecord component
-
promoteAi
public boolean promoteAi()Returns the value of thepromoteAirecord component.- Returns:
- the value of the
promoteAirecord component
-
detectSecrets
public boolean detectSecrets()Returns the value of thedetectSecretsrecord component.- Returns:
- the value of the
detectSecretsrecord component
-
secretsInclude
Returns the value of thesecretsIncluderecord component.- Returns:
- the value of the
secretsIncluderecord component
-
secretsRules
Returns the value of thesecretsRulesrecord component.- Returns:
- the value of the
secretsRulesrecord component
-
secretsOut
Returns the value of thesecretsOutrecord component.- Returns:
- the value of the
secretsOutrecord component
-
secretsSeparateLlm
public boolean secretsSeparateLlm()Returns the value of thesecretsSeparateLlmrecord component.- Returns:
- the value of the
secretsSeparateLlmrecord component
-
secretsShowValues
public boolean secretsShowValues()Returns the value of thesecretsShowValuesrecord component.- Returns:
- the value of the
secretsShowValuesrecord component
-
secretsErrorThreshold
public double secretsErrorThreshold()Returns the value of thesecretsErrorThresholdrecord component.- Returns:
- the value of the
secretsErrorThresholdrecord component
-
secretsWarningThreshold
public double secretsWarningThreshold()Returns the value of thesecretsWarningThresholdrecord component.- Returns:
- the value of the
secretsWarningThresholdrecord component
-
secretsMinScore
public double secretsMinScore()Returns the value of thesecretsMinScorerecord component.- Returns:
- the value of the
secretsMinScorerecord component
-
aiCacheOut
Returns the value of theaiCacheOutrecord component.- Returns:
- the value of the
aiCacheOutrecord component
-