Skip to content

Commit

Permalink
add support to 2020.2.18 CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelfreitas93 committed Jun 18, 2020
1 parent ab571da commit bb9101e
Show file tree
Hide file tree
Showing 14 changed files with 181 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 2020.1.12 Generate Token Wrong Credentials
name: 2020.2.11 Generate Token Wrong Credentials
on:
push:
branches:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 2020.2.18 Generate Token Wrong Credentials
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkmarx Action
uses: ./
with:
cxServer: ${{ secrets.CX_SERVER }}
cxAction: GenerateToken
cxUsername: ${{ secrets.CX_EMAIL }}
cxPassword: "123456"
cxSkipIfFail: true
cxVersion: "2020.2.18"
cxLog: log.log
- name: Upload artifact
uses: actions/[email protected]
with:
name: log.log
path: log.log
34 changes: 34 additions & 0 deletions .github/workflows/cx-2020.2.18-osa-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 2020.2.18 OSA Scan
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkmarx Action
uses: ./
with:
cxAction: OsaScan
cxServer: ${{ secrets.CX_OSA_SERVER }}
cxUsername: ${{ secrets.CX_OSA_EMAIL }}
cxPassword: ${{ secrets.CX_OSA_PASSWORD }}
cxTeam: ${{ secrets.CX_OSA_TEAM }}
cxExecutePackageDependency: true
cxVersion: "2020.2.18"
cxLog: log.log
cxGithubIssues: true
cxGithubToken: ${{ secrets.GITHUB_TOKEN }}
cxGithubLabels: bug,test
cxGithubAssignees: miguelfreitas93
- name: Upload artifact
uses: actions/[email protected]
with:
name: log.log
path: log.log
25 changes: 25 additions & 0 deletions .github/workflows/cx-2020.2.18-revoke-token-trust-certs-true.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 2020.2.18 Revoke Token Trust Certs True
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkmarx Action
uses: ./
with:
cxServer: ${{ secrets.CX_SERVER }}
cxAction: RevokeToken
cxToken: ${{ secrets.CX_TOKEN }}
cxTrustedCertificates: true
cxVersion: "2020.2.18"
cxLog: log.log
- name: Upload artifact
uses: actions/[email protected]
with:
name: log.log
path: log.log
24 changes: 24 additions & 0 deletions .github/workflows/cx-2020.2.18-revoke-token.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 2020.2.18 Revoke Token
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkmarx Action
uses: ./
with:
cxServer: ${{ secrets.CX_SERVER }}
cxAction: RevokeToken
cxToken: ${{ secrets.CX_TOKEN }}
cxVersion: "2020.2.18"
cxLog: log.log
- name: Upload artifact
uses: actions/[email protected]
with:
name: log.log
path: log.log
33 changes: 33 additions & 0 deletions .github/workflows/cx-2020.2.18-sast-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 2020.2.18 SAST Scan
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkmarx Action
uses: ./
with:
cxAction: Scan
cxServer: ${{ secrets.CX_SERVER }}
cxUsername: ${{ secrets.CX_EMAIL }}
cxPassword: ${{ secrets.CX_PASSWORD }}
cxTeam: ${{ secrets.CX_TEAM }}
cxVersion: "2020.2.18"
cxLog: log.log
cxGithubIssues: true
cxGithubToken: ${{ secrets.GITHUB_TOKEN }}
cxGithubLabels: bug,test
cxGithubAssignees: miguelfreitas93
- name: Upload artifact
uses: actions/[email protected]
with:
name: log.log
path: log.log
30 changes: 30 additions & 0 deletions .github/workflows/cx-2020.2.18-sca-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 2020.2.18 SCA Scan
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkmarx Action
uses: ./
with:
cxAction: ScaScan
cxScaAccount: ${{ secrets.CX_SCA_ACCOUNT }}
cxScaUsername: ${{ secrets.CX_SCA_USERNAME }}
cxScaPassword: ${{ secrets.CX_SCA_PASSWORD }}
cxScaPathExclude: coverage,images
cxExecutePackageDependency: true
cxVersion: "2020.2.18"
cxLog: log.log
- name: Upload artifact
uses: actions/[email protected]
with:
name: log.log
path: log.log
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ Here the list of versions supported:
- 2020.2.3
- 2020.2.7
- 2020.2.11
- 2020.2.18
## Secrets
Expand Down
11 changes: 7 additions & 4 deletions src/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ const CLI_DOWNLOAD_URLS = [
DOWNLOAD_DOMAIN + "/9.0.0/" + DOWNLOAD_COMMON_PATH + "2020.2.3.zip",//7
DOWNLOAD_DOMAIN + "/9.0.0/" + DOWNLOAD_COMMON_PATH + "2020.2.7.zip",//8
DOWNLOAD_DOMAIN + "/9.0.0/" + DOWNLOAD_COMMON_PATH + "2020.2.11.zip",//9
DOWNLOAD_DOMAIN + "/9.0.0/" + DOWNLOAD_COMMON_PATH + "2020.2.18.zip",//10
]
const CLI_FOLDER_NAME = "cxcli"

function getCliDownloadUrl(cxVersion) {
if (isValidVersion(cxVersion)) {
switch (cxVersion) {
case "2020":
return CLI_DOWNLOAD_URLS[9]
return CLI_DOWNLOAD_URLS[10]
case "2020.2":
return CLI_DOWNLOAD_URLS[9]
return CLI_DOWNLOAD_URLS[10]
case "2020.2.18":
return CLI_DOWNLOAD_URLS[10]
case "2020.2.11":
return CLI_DOWNLOAD_URLS[9]
case "2020.2.7":
Expand Down Expand Up @@ -82,9 +85,9 @@ function getCliDownloadUrl(cxVersion) {
}
} else {
if (cxVersion.startsWith("2020")) {
return CLI_DOWNLOAD_URLS[9]
return CLI_DOWNLOAD_URLS[10]
} else if (cxVersion.startsWith("9.0")) {
return CLI_DOWNLOAD_URLS[9]
return CLI_DOWNLOAD_URLS[10]
} else if (cxVersion.startsWith("8.9")) {
return CLI_DOWNLOAD_URLS[3]
} else if (cxVersion.startsWith("8.8")) {
Expand Down

2 comments on commit bb9101e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Checkmarx][OSA]

Libraries Summary

Score Vulnerable and Outdated Vulnerable and Updated Non Vulnerable Total
secure 0 0 47 47

Libraries Summary By Severity

High Vulnerables Libraries Medium Vulnerables Libraries Low Vulnerables Libraries Non Vulnerable Total
0 0 0 47 47

Result Summary Details

Results By Status

New Recurrent Resolved Reopened
0 0 0 0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Checkmarx] - Project : checkmarx-github-action-master - Scan ID : 1000099


Project Details
Checkmarx Version: 9.0.0.40085 HF1
Project ID: 6
Project Name: checkmarx-github-action-master
Preset: Checkmarx Default
Owner: miguel
Team: CxServer\SP\EMEA


Scan Details
Initiator Name: Miguel Freitas
Scan ID: 1000099
LOC: 7791
Files Scanned: 15
Scan Type: Full
Scan URL: https://cxprivatecloud.checkmarx.net/CxWebClient/ViewerMain.aspx?scanid=1000099&projectid=6
Scan Comment: git master@bb9101ed82fa9485fe5c6677f5608c3a8c077f25
Scan Type: 00h:01m:09s
Scan Start Date: Thu Jun 18 2020 00:47:09 GMT+0000 (Coordinated Universal Time)
Scan Time: 00h:01m:09s
Source Origin: LocalPath
Visibility: Public


Results Summary Details

Results By Status

New Recurrent Resolved Reopened Total
0 3 0 0 3

Results By State and Severity

Severity \ State Confirmed Urgent Proposed Not Exploitable To Verify Not Exploitable Total
High 0 0 0 0 0 0
Medium 0 0 0 0 0 0
Low 0 0 0 0 3 3
Info 0 0 0 0 0 0
Total 0 0 0 0 3 3

Results By Queries

Queries Total Results
Use_Of_Hardcoded_Password 2
Client_Server_Empty_Password 1

Results By Languages

Languages Total Results
JavaScript 3

Vulnerabilities in Files:
https://github.com/checkmarx-ts/checkmarx-github-action/blob/bb9101ed82fa9485fe5c6677f5608c3a8c077f25/src/github/inputs.js
https://github.com/checkmarx-ts/checkmarx-github-action/blob/bb9101ed82fa9485fe5c6677f5608c3a8c077f25/src/cli/token.js

Please sign in to comment.