Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 5.45 KB

run-with-cli.md

File metadata and controls

67 lines (45 loc) · 5.45 KB

Run Pickaxe from Commandline

Build the project and run the jar file generated by the aem-security-scans module

java -jar aem-security-scans-<version>-SNAPSHOT-jar-with-dependencies.jar \
    --url <url to your AEM website> \
    --output <some directory path>

CLI: Supported Parameters

Parameter Short Example Description Status
--url --url http://localhost:4503/content/we-reatil.html Target entrypoint URL Supported
--targets -ta --targets /content/aboutus.html Define which additional paths should be added to the scan. only an extension to url. The url property has to be defined.
--location -l --location /home/Users/youruser/securitychecks --location /home/Users/youruser/securitychecks/dispatchercheck.groovy Defines the location where SecurityCheck files should be loaded from. This can be a directory or a single file
--scan -s --scan /home/Users/youruser/scanconfig.groovy Defines the location where ScanDelegate config files should be loaded from. This should be a single file. Uses the default scan config if not set.
--output -o --output /home/Users/youruser/securitychecks/results Define output folder where results are stored Supported
--categories -s --output xss,dispatcher Define the SecurityCheck categories which should be executed. Can be a single category or a list of categories separated by comma Supported
--ignored -ig --ignored nc-vZOwFwjN Define which checks are ignored and never executed Supported
--falsepositives -fp --falsepositives nc-vZOwFwjN Define which checks are not considered in the results list Supported
--names -n --names , ... e.g --names nc-vZOwFwjN Define the SecurityCheck ids which should be executed. Can be a single id or a list of ids separated by comma Supported
--authtype -a --authtype simple Define the authentication type. Use simple to set Basic authentication Supported
--username -u --username editor Define the username. Supported
--password -p --username secret-pw Define the password. Supported
--checks -ch --checks
--id -id --checks

Example: Scan a target defaults

Run the scanner against https://<www.your-target-system.com>/de.html.

java -jar aem-security-scans-<version>-SNAPSHOT-jar-with-dependencies.jar \
    --url https://<www.your-target-system.com>/de.html \
    --output /Users/<our-account>/securitycheckresults

The properties --url and --ouput are mandatory.

Example: Scan with Basic Authentication

Scan the basic auth protected target https://<www.your-target-system.com>/de.html with the check nc-UniC7eLvR (unicode bypass). This example creates an authorization header using the supplied basic auth credentials.

java -jar aem-security-scans-<version>-SNAPSHOT-jar-with-dependencies.jar \
    --url https://<www.your-target-system.com>/de.html \
    --output /Users/<our-account>/securitycheckresults \
    --names nc-UniC7eLvR \
    --authtype simple \
    --username <Basic-Auth-User> \
    --password <Basic-Auth-PAssword>

Find out about available checks and their IDs

The following command prints out a list of all registered build in checks, including their ID, name and categories

java -jar aem-security-scans-<version>-SNAPSHOT-jar-with-dependencies.jar --checks

Create a new random ID for your custom check

There is no pattern required, so you are free to just compose them. But to simplify things call for a new ID for any of your custom checks

java -jar aem-security-scans-<version>-SNAPSHOT-jar-with-dependencies.jar --id