Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The results will be stored in /tmp/django/results/issues.sarif.

Analyze the Javascript project express located in /tmp/express/src by running the extended security QL pack on it:
```
scripts/unix/run_qlpack.sh /tmp/express/src /tmp/express/results javascript security-extended
scripts/unix/run_ql_suite.sh /tmp/express/src /tmp/express/results javascript security-extended
```

The results will be stored in /tmp/express/results/issues.sarif
Expand Down
2 changes: 1 addition & 1 deletion scripts/unix/analyze_security.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ else
fi

print_yellow "\nRunning the Quality and Security rules on the project"
docker run --rm --name codeql-container -v ${inputfile}:/opt/src -v ${outputfile}:/opt/results -e CODEQL_CLI_ARGS=database\ analyze\ /opt/results/source_db\ --format=sarifv2\ --output=/opt/results/issues.sarif\ ${language}-security-and-quality.qls mcr.microsoft.com/cstsectools/codeql-container
docker run --rm --name codeql-container -v ${inputfile}:/opt/src -v ${outputfile}:/opt/results -e CODEQL_CLI_ARGS=database\ analyze\ /opt/results/source_db\ --format=sarifv2.1.0\ --output=/opt/results/issues.sarif\ ${language}-security-and-quality.qls mcr.microsoft.com/cstsectools/codeql-container
if [ $? -eq 0 ]
then
print_green "\nQuery execution successful"
Expand Down
2 changes: 1 addition & 1 deletion scripts/unix/run_ql_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ else
fi

print_yellow "\nRunning the ${qlpack} ql pack rules on the project"
docker run --rm --name codeql-container -v ${inputfile}:/opt/src -v ${outputfile}:/opt/results -e CODEQL_CLI_ARGS=database\ analyze\ /opt/results/source_db\ --format=sarifv2\ --output=/opt/results/issues.sarif\ ${language}-${qlpack}.qls mcr.microsoft.com/cstsectools/codeql-container
docker run --rm --name codeql-container -v ${inputfile}:/opt/src -v ${outputfile}:/opt/results -e CODEQL_CLI_ARGS=database\ analyze\ /opt/results/source_db\ --format=sarifv2.1.0\ --output=/opt/results/issues.sarif\ ${language}-${qlpack}.qls mcr.microsoft.com/cstsectools/codeql-container
if [ $? -eq 0 ]
then
print_green "\nQuery execution successful"
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows/analyze_security.bat
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if %errorlevel% GTR 0 (
)

call :print_yellow "Running the Quality and Security rules on the project"
start /W /B docker run --rm --name codeql-container -v "%inputfile%:/opt/src" -v "%outputfile%:/opt/results" -e CODEQL_CLI_ARGS="database analyze /opt/results/source_db --format=sarifv2 --output=/opt/results/issues.sarif %language%-security-and-quality.qls" mcr.microsoft.com/cstsectools/codeql-container
start /W /B docker run --rm --name codeql-container -v "%inputfile%:/opt/src" -v "%outputfile%:/opt/results" -e CODEQL_CLI_ARGS="database analyze /opt/results/source_db --format=sarifv2.1.0 --output=/opt/results/issues.sarif %language%-security-and-quality.qls" mcr.microsoft.com/cstsectools/codeql-container
if %errorlevel% GTR 0 (
call :print_red "Failed to run the query on the database"
exit /b %errorlevel%
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows/run_ql_suite.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if %errorlevel% GTR 0 (
)

call :print_yellow "Running the %qlpack% ql pack rules on the project"
start /W /B docker run --rm --name codeql-container -v "%inputfile%:/opt/src" -v "%outputfile%:/opt/results" -e CODEQL_CLI_ARGS="database analyze /opt/results/source_db --format=sarifv2 --output=/opt/results/issues.sarif %language%-%qlpack%.qls" mcr.microsoft.com/cstsectools/codeql-container
start /W /B docker run --rm --name codeql-container -v "%inputfile%:/opt/src" -v "%outputfile%:/opt/results" -e CODEQL_CLI_ARGS="database analyze /opt/results/source_db --format=sarifv2.1.0 --output=/opt/results/issues.sarif %language%-%qlpack%.qls" mcr.microsoft.com/cstsectools/codeql-container
if %errorlevel% GTR 0 (
call :print_red "Failed to run the query on the database"
exit /b %errorlevel%
Expand Down