Skip to content

sync #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed

sync #47

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f10e381
sync
BenAlvo1 Nov 25, 2024
053a50f
Update Vorpal Name to ASCA(AST-65647) (#759)
cx-miryam-foifer Sep 23, 2024
7f2d11e
[create-pull-request] automated change (#764)
OrShamirCM Sep 23, 2024
282bf0d
Update checkmarx-ast-cli binaries with 2.3.0 (#766)
cx-pedro-lopes Oct 8, 2024
111b869
[create-pull-request] automated change (#771)
OrShamirCM Oct 8, 2024
0f71851
Update checkmarx-ast-cli binaries with 2.3.1 (#773)
cx-pedro-lopes Oct 21, 2024
c6c5130
[create-pull-request] automated change (#774)
OrShamirCM Oct 21, 2024
88929df
Update checkmarx-ast-cli binaries with 2.3.3 (#776)
cx-pedro-lopes Nov 4, 2024
dcad97d
[create-pull-request] automated change (#779)
OrShamirCM Nov 4, 2024
3335cd6
Update Node version ( AST-72890) (#780)
cx-sarah-chen Nov 11, 2024
fc3da2b
Add AST Scan (#783)
amacedoo Nov 11, 2024
c6d62bd
Update checkmarx-ast-cli binaries with 2.3.5 (#784)
cx-pedro-lopes Nov 18, 2024
b77d25b
[create-pull-request] automated change (#785)
OrShamirCM Nov 18, 2024
3d53a7a
delete git lfs
BenAlvo1 Sep 17, 2024
ff8e254
check
BenAlvo1 Sep 17, 2024
731d5e8
implement CxInstaller.ts
BenAlvo1 Sep 18, 2024
0cef9e8
check
BenAlvo1 Sep 18, 2024
aefd4d7
fixing
BenAlvo1 Sep 19, 2024
e4663cb
upgrade to node 16
BenAlvo1 Sep 22, 2024
827b9c3
added singleton and factory design patterns to CxWrapper
BenAlvo1 Sep 24, 2024
771a767
[create-pull-request] automated change (#24)
OrShamirCM Oct 6, 2024
acbdfad
upgrade to node 20
BenAlvo1 Nov 13, 2024
30d28b4
upgrade
cx-sarah-chen Nov 7, 2024
d2a68c6
[create-pull-request] automated change (#37)
OrShamirCM Nov 18, 2024
eb99817
Revert "[create-pull-request] automated change (#37)"
cx-ben-alvo Nov 18, 2024
6f08edf
[create-pull-request] automated change (#39)
OrShamirCM Nov 18, 2024
c215092
Revert "[create-pull-request] automated change (#39)"
cx-ben-alvo Nov 18, 2024
96665cc
[create-pull-request] automated change (#41)
OrShamirCM Nov 18, 2024
05a4f99
Delete .github/scripts/update_cli.sh
cx-ben-alvo Nov 25, 2024
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
25 changes: 25 additions & 0 deletions .github/workflows/ast-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Checkmarx One Scan
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: '00 7 * * *' # Every day at 07:00

jobs:
cx-scan:
name: Checkmarx One Scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Checkmarx One CLI Action
uses: checkmarx/ast-github-action@03a90e7253dadd7e2fff55f5dfbce647b39040a1 # v.2.0.37
with:
base_uri: ${{ secrets.AST_RND_SCANS_BASE_URI }}
cx_tenant: ${{ secrets.AST_RND_SCANS_TENANT }}
cx_client_id: ${{ secrets.AST_RND_SCANS_CLIENT_ID }}
cx_client_secret: ${{ secrets.AST_RND_SCANS_CLIENT_SECRET }}
additional_params: --tags phoenix --threshold "sca-critical=1;sca-high=1;sca-medium=1;sca-low=1;sast-critical=1;sast-high=1;sast-medium=1;sast-low=1;iac-security-critical=1;iac-security-high=1;iac-security-medium=1;iac-security-low=1"
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js 22.11.0
uses: actions/[email protected]
with:
Expand Down
34 changes: 5 additions & 29 deletions .github/workflows/update-cli.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,29 @@
name: Update Checkmarx AST CLI

name: Update checkmarx ast cli
on:
workflow_dispatch:
inputs:
new_cli_version:
description: 'New CLI version (optional)'
required: false
schedule:
- cron: '0 0 * * *'

jobs:
update-checkmarx-cli:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Fetch the latest Checkmarx AST CLI version
- name: Get Latest Checkmarx API version
id: checkmarx-ast-cli
run: |
if [ "${{ github.event.inputs.new_cli_version }}" ]; then
LATEST_VERSION=${{ github.event.inputs.new_cli_version }}
else
LATEST_VERSION=$(curl -sL https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
fi
CURRENT_VERSION=$(<checkmarx-ast-cli.version)
echo ::set-output name=release_tag::$LATEST_VERSION
echo ::set-output name=current_tag::$CURRENT_VERSION
echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
echo ::set-output name=current_tag::$(<checkmarx-ast-cli.version)

# Update the version file if the latest version differs
- name: Update Checkmarx CLI version in version file
- name: Update Checkmarx cli version
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
env:
RELEASE_TAG: ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
run: |
# Update current release
echo ${{ steps.checkmarx-ast-cli.outputs.release_tag }} > checkmarx-ast-cli.version

# Update the TypeScript file's cliDefaultVersion field
- name: Update cliDefaultVersion in CxInstaller.ts
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
env:
NEW_CLI_VERSION: ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
run: |
FILE_PATH="src/main/osinstaller/CxInstaller.ts"
# Ensure that 'cliDefaultVersion' is updated correctly
sed -i "s/\(cliDefaultVersion = '\)[^']*\(';\)/\1${NEW_CLI_VERSION}\2/" $FILE_PATH

# Create a Pull Request with the version changes
- name: Create Pull Request
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6
Expand Down
2 changes: 1 addition & 1 deletion checkmarx-ast-cli.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.5
2.2.5
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli",
"version": "1.0.6",
"version": "1.0.1",
"description": "AST CLI Javascript wrapper runtime CLI",
"main": "dist/main/wrapper/CxWrapper.js",
"typings": "dist/main/wrapper/CxWrapper.d.ts",
Expand All @@ -22,7 +22,7 @@
"postbuild": "copyfiles -u 1 src/tests/data/* dist/;",
"lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix",
"test": "copyfiles -u 1 src/tests/data/* dist/; tsc && jest --runInBand"
"test": "copyfiles -u 1 src/tests/data/* dist/; tsc && jest"
},
"repository": "https://github.com/CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli.git",
"author": "Jay Nanduri",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default class VorpalScanDetail {
export default class AscaScanDetail {
ruleId: number;
language: string;
ruleName: string;
Expand Down
12 changes: 6 additions & 6 deletions src/main/vorpal/CxVorpal.ts → src/main/asca/CxAsca.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import VorpalScanDetail from "./VorpalScanDetail";
import AscaScanDetail from "./AscaScanDetail";

export default class CxVorpal {
export default class CxAsca {
requestId: string;
status: boolean;
message: string;
scanDetails: VorpalScanDetail[];
scanDetails: AscaScanDetail[];
error: any;

constructor() {
Expand All @@ -15,16 +15,16 @@ export default class CxVorpal {
this.error = null;
}

static parseScan(resultObject: any): CxVorpal {
const scan = new CxVorpal();
static parseScan(resultObject: any): CxAsca {
const scan = new CxAsca();
scan.requestId = resultObject.request_id;
scan.status = resultObject.status;
scan.message = resultObject.message;
scan.error = resultObject.error;

if (resultObject.scan_details instanceof Array) {
scan.scanDetails = resultObject.scan_details.map((detail: any) => {
const scanDetail = new VorpalScanDetail();
const scanDetail = new AscaScanDetail();
scanDetail.ruleId = detail.rule_id;
scanDetail.language = detail.language;
scanDetail.ruleName = detail.rule_name;
Expand Down
1 change: 1 addition & 0 deletions src/main/client/AstClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ export class AstClient {
}
}
}

Loading
Loading