From cc8b43996d24fcbed5db39c14759c3b68b187e9a Mon Sep 17 00:00:00 2001 From: Michaela Perrotta Date: Wed, 13 Nov 2024 10:30:03 -0500 Subject: [PATCH] rename disableSecrets to noSecrets for backwards compatability --- src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java | 4 ++-- .../java/com/hcl/appscan/sdk/scanners/sast/SASTConstants.java | 4 ++-- .../hcl/appscan/sdk/scanners/sast/xml/IModelXMLConstants.java | 2 +- .../java/com/hcl/appscan/sdk/scanners/sast/xml/XmlWriter.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java b/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java index f66b73c4..46c3d9e7 100644 --- a/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java +++ b/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java @@ -352,8 +352,8 @@ private List getClientArgs(Map properties) { args.add(properties.get(SCAN_SPEED)); } } - if(properties.containsKey(SECRETS_DISABLED) || System.getProperty(SECRETS_DISABLED) != null) { - args.add(OPT_SECRETS_DISABLED); + if(properties.containsKey(NO_SECRETS) || System.getProperty(NO_SECRETS) != null) { + args.add(OPT_NO_SECRETS); } if(properties.containsKey(SECRETS_ENABLED) || System.getProperty(SECRETS_ENABLED) != null) { args.add(OPT_SECRETS_ENABLED); diff --git a/src/main/java/com/hcl/appscan/sdk/scanners/sast/SASTConstants.java b/src/main/java/com/hcl/appscan/sdk/scanners/sast/SASTConstants.java index ee1f1e45..f24babc9 100644 --- a/src/main/java/com/hcl/appscan/sdk/scanners/sast/SASTConstants.java +++ b/src/main/java/com/hcl/appscan/sdk/scanners/sast/SASTConstants.java @@ -34,7 +34,7 @@ public interface SASTConstants { String OPEN_SOURCE_ONLY = "openSourceOnly"; //$NON-NLS-1$ String SOURCE_CODE_ONLY = "sourceCodeOnly"; //$NON-NLS-1$ String SECRETS_ENABLED = "enableSecrets"; //$NON-NLS-1$ - String SECRETS_DISABLED = "disableSecrets"; //$NON-NLS-1$ + String NO_SECRETS = "noSecrets"; //$NON-NLS-1$ String SECRETS_ONLY = "secretsOnly"; //$NON-NLS-1$ String SCAN_SPEED = "scanSpeed"; //$NON-NLS-1$ String OPT_SCAN_SPEED = "-s"; //$NON-NLS-1$ @@ -57,7 +57,7 @@ public interface SASTConstants { String OPT_SOURCE_CODE_ONLY = "-sco"; //$NON-NLS-1$ String OPT_STATIC_ANALYSIS_ONLY = "-sao"; //$NON-NLS-1$ String OPT_SECRETS_ENABLED = "-es"; //$NON-NLS-1$ - String OPT_SECRETS_DISABLED = "-ds"; //$NON-NLS-1$ + String OPT_NO_SECRETS = "-ns"; //$NON-NLS-1$ String OPT_SECRETS_ONLY = "-so"; //$NON-NLS-1$ String OPT_ACCEPTS_SSL = "-acceptssl"; //$NON-NLS-1$ diff --git a/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/IModelXMLConstants.java b/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/IModelXMLConstants.java index 197aad1d..6cfc1633 100644 --- a/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/IModelXMLConstants.java +++ b/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/IModelXMLConstants.java @@ -25,7 +25,7 @@ public interface IModelXMLConstants { String A_SOURCE_CODE_ONLY = "sourceCodeOnly"; //$NON-NLS-1$ String A_STATIC_ANALYSIS_ONLY = "staticAnalysisOnly"; //$NON-NLS-1$ String A_SECRETS_ENABLED = "enableSecrets"; //$NON-NLS-1$ - String A_SECRETS_DISABLED = "disableSecrets"; //$NON-NLS-1$ + String A_NO_SECRETS = "noSecrets"; //$NON-NLS-1$ String A_SECRETS_ONLY = "secretsOnly"; //$NON-NLS-1$ //Java diff --git a/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/XmlWriter.java b/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/XmlWriter.java index 3c639225..549ddb7e 100644 --- a/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/XmlWriter.java +++ b/src/main/java/com/hcl/appscan/sdk/scanners/sast/xml/XmlWriter.java @@ -72,7 +72,7 @@ public void visit(List targets, boolean isThirdPartyScanningEnabled } if (isSecretsScanningDisabled) { - m_config.setAttribute(A_SECRETS_DISABLED, "true"); + m_config.setAttribute(A_NO_SECRETS, "true"); } if (isSecretsScanningEnabled) { m_config.setAttribute(A_SECRETS_ENABLED, "true");