Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
20a61b1
update package.json
BenAlvo1 Sep 22, 2024
20f935e
upgrade to node 16
BenAlvo1 Sep 22, 2024
1d611c9
refactor
BenAlvo1 Sep 22, 2024
964c90c
add delete zip file after extracted
BenAlvo1 Sep 23, 2024
e59cf25
optimize dependencies
BenAlvo1 Sep 23, 2024
7319800
remove unessecary dependency
BenAlvo1 Sep 23, 2024
33e97ce
fix
BenAlvo1 Sep 23, 2024
f8b0df2
re trigger scan
BenAlvo1 Sep 23, 2024
69460d4
retrigger cx scan
BenAlvo1 Sep 23, 2024
8349d1e
update cliDefaultVersion to 2.2.6
BenAlvo1 Sep 23, 2024
227bdaa
revert jest.config.js changes
BenAlvo1 Sep 23, 2024
46dc19d
revert test package.json data changes
BenAlvo1 Sep 23, 2024
4fdbc7d
added README.md to resource directory
BenAlvo1 Sep 23, 2024
17eda51
create resource dir if not exists
BenAlvo1 Sep 23, 2024
f6b9ac0
check
BenAlvo1 Sep 23, 2024
71723eb
fix
BenAlvo1 Sep 23, 2024
6bb1e64
set cli version
BenAlvo1 Sep 23, 2024
a6be1cc
include version file in package
BenAlvo1 Sep 23, 2024
6d0c28d
check
BenAlvo1 Sep 23, 2024
541d44e
Update update-cli.yml
BenAlvo1 Sep 23, 2024
12427d5
update github actions
BenAlvo1 Sep 23, 2024
81d3d09
fix package.json
BenAlvo1 Sep 23, 2024
57d1708
delete enter
BenAlvo1 Sep 23, 2024
bbf2bba
add commit sha
BenAlvo1 Sep 24, 2024
d0fb006
Update update-cli.yml
BenAlvo1 Sep 24, 2024
e1e2e83
added singleton and factory design patterns to CxWrapper
BenAlvo1 Sep 24, 2024
bde1814
delete unused set/get config
BenAlvo1 Sep 24, 2024
88a6161
refactor
BenAlvo1 Sep 24, 2024
1468265
remove uneeded semaphore from CxInstaller.ts
BenAlvo1 Sep 24, 2024
7b17b74
remove semaphore import
BenAlvo1 Sep 24, 2024
2a4c32d
added private and public to CxInstaller functions
BenAlvo1 Sep 24, 2024
6c37f42
make CxWrapper constructor private
BenAlvo1 Sep 24, 2024
0553d9e
added "multiple singleton" - one for each different scan configuratio…
BenAlvo1 Sep 24, 2024
a09505c
fix linter
BenAlvo1 Sep 24, 2024
4bf063b
resolve conversations
BenAlvo1 Sep 24, 2024
2388883
delete unecessery clone
BenAlvo1 Sep 24, 2024
6404d94
add comment
BenAlvo1 Sep 24, 2024
f6d7bf3
fix linter
BenAlvo1 Sep 24, 2024
a4cbc65
revert delete checkExecutableExists
BenAlvo1 Sep 24, 2024
18407b8
make CxWrapperFactory.ts interface and object
BenAlvo1 Sep 24, 2024
d03dc18
Merge pull request #2 from CheckmarxDev/benalvo/create-runtime-wrapper
OrShamirCM Sep 24, 2024
8b58602
[create-pull-request] automated change (#16)
OrShamirCM Sep 30, 2024
7c13b38
[create-pull-request] automated change (#18)
OrShamirCM Oct 1, 2024
38922de
Revert "[create-pull-request] automated change (#18)"
cx-ben-alvo Oct 1, 2024
cecd7fb
Merge pull request #19 from CheckmarxDev/revert-18-npm-version-patch
cx-ben-alvo Oct 1, 2024
b0cdfa2
[create-pull-request] automated change (#20)
OrShamirCM Oct 1, 2024
37d6728
add getVersionFilePath
BenAlvo1 Oct 6, 2024
38476ca
[create-pull-request] automated change (#22)
OrShamirCM Oct 6, 2024
130b262
Revert "[create-pull-request] automated change (#22)"
cx-ben-alvo Oct 6, 2024
1856551
Merge pull request #23 from CheckmarxDev/revert-22-npm-version-patch
cx-ben-alvo Oct 6, 2024
4daad4a
Merge branch 'main' into fix/benalvo/get-version-file-path
cx-ben-alvo Oct 6, 2024
d02a2d9
change to version 1.0.0
BenAlvo1 Oct 6, 2024
942fb8a
chnage to version 1.0.0
BenAlvo1 Oct 6, 2024
e2faa28
[create-pull-request] automated change (#24)
OrShamirCM Oct 6, 2024
0412265
Merge branch 'main' into fix/benalvo/get-version-file-path
cx-ben-alvo Oct 6, 2024
2e3b4eb
Merge pull request #21 from CheckmarxDev/fix/benalvo/get-version-file…
cx-ben-alvo Oct 7, 2024
3206d0e
[create-pull-request] automated change (#25)
OrShamirCM Oct 7, 2024
be69cbd
[create-pull-request] automated change (#26)
OrShamirCM Oct 7, 2024
ba93e41
upgrade
cx-sarah-chen Nov 7, 2024
abbc713
change test execution to be synchronized
BenAlvo1 Nov 10, 2024
418a7cc
add cliInstalledVersion
BenAlvo1 Nov 10, 2024
b2a16cb
add proxy support
BenAlvo1 Nov 10, 2024
5ee1481
implemented httpClient and Client interface. Added arm support for li…
BenAlvo1 Nov 10, 2024
9e55956
refactor getArchitecture
BenAlvo1 Nov 10, 2024
f1896dd
refactor
BenAlvo1 Nov 10, 2024
0ff7ac8
add tupe to client feild in CxInstaller.ts
BenAlvo1 Nov 10, 2024
70caeb6
remove unnecessary log
BenAlvo1 Nov 10, 2024
39b7de9
refactor
BenAlvo1 Nov 11, 2024
0163621
Added unit tests
BenAlvo1 Nov 11, 2024
e919b62
update test
BenAlvo1 Nov 11, 2024
914f9ff
fix tests
BenAlvo1 Nov 11, 2024
520dba8
added astClient
BenAlvo1 Nov 11, 2024
ebfdd0a
Merge pull request #28 from CheckmarxDev/feature/benalvo/add-proxy-su…
cx-ben-alvo Nov 12, 2024
c00bc71
[create-pull-request] automated change (#29)
OrShamirCM Nov 12, 2024
cc5cd1e
upgrade cli version
BenAlvo1 Nov 13, 2024
de9af40
comment vorpal tests
BenAlvo1 Nov 13, 2024
acfed36
comment vorpal test
BenAlvo1 Nov 13, 2024
85fa7ac
Merge branch 'main' into othet/updateVresions
cx-sarah-chen Nov 13, 2024
86dd544
upgrade to node 20
BenAlvo1 Nov 13, 2024
2b3ac83
fix cxInstaller tests
BenAlvo1 Nov 13, 2024
a2fabce
decrease branches coverage
BenAlvo1 Nov 13, 2024
fc1d1cf
Merge pull request #27 from CheckmarxDev/othet/updateVresions
cx-sarah-chen Nov 13, 2024
0cbbc9f
Revert "[create-pull-request] automated change (#29)"
cx-ben-alvo Nov 13, 2024
15b6eaf
Merge pull request #31 from CheckmarxDev/revert-29-npm-version-patch
cx-ben-alvo Nov 13, 2024
ee50299
Merge branch 'main' into other/update-cli-version-2.3.3
cx-ben-alvo Nov 13, 2024
cdd723b
upgrade cli to 2.3.4
BenAlvo1 Nov 14, 2024
8b0b204
Merge pull request #30 from CheckmarxDev/other/update-cli-version-2.3.3
OrShamirCM Nov 14, 2024
4dfb967
[create-pull-request] automated change (#32)
OrShamirCM Nov 14, 2024
bcb0837
[create-pull-request] automated change (#33)
OrShamirCM Nov 14, 2024
f6f2f38
Update checkmarx-ast-cli to 2.3.5
cx-ben-alvo Nov 18, 2024
a5f8b0e
Merge pull request #34 from CheckmarxDev/feature/update_cli
cx-ben-alvo Nov 18, 2024
815486d
[create-pull-request] automated change (#35)
OrShamirCM Nov 18, 2024
c7e5f13
[create-pull-request] automated change (#37)
OrShamirCM Nov 18, 2024
09c3c38
Revert "[create-pull-request] automated change (#37)"
cx-ben-alvo Nov 18, 2024
e6180b2
Merge pull request #38 from CheckmarxDev/revert-37-npm-version-patch
cx-ben-alvo Nov 18, 2024
9700e3e
[create-pull-request] automated change (#39)
OrShamirCM Nov 18, 2024
de92a33
Revert "[create-pull-request] automated change (#39)"
cx-ben-alvo Nov 18, 2024
4520a6c
Merge pull request #40 from CheckmarxDev/revert-39-npm-version-patch
cx-ben-alvo Nov 18, 2024
f795140
[create-pull-request] automated change (#41)
OrShamirCM Nov 18, 2024
683fbd5
[create-pull-request] automated change (#42)
OrShamirCM Nov 18, 2024
a20179f
add indicative msg
BenAlvo1 Nov 24, 2024
8eb479f
check
BenAlvo1 Nov 24, 2024
1324f8e
check
BenAlvo1 Nov 24, 2024
6ef3951
Revert "check"
BenAlvo1 Nov 24, 2024
6414e67
Revert "check"
BenAlvo1 Nov 24, 2024
fce8af8
check why test failing with new Error type
BenAlvo1 Nov 24, 2024
fb77767
refactor
BenAlvo1 Nov 24, 2024
8636201
delete git lfs
BenAlvo1 Sep 17, 2024
dbde9c1
check
BenAlvo1 Sep 17, 2024
5d21bac
implement CxInstaller.ts
BenAlvo1 Sep 18, 2024
f18cbe2
implement CxInstaller
BenAlvo1 Sep 18, 2024
70896df
check linter
BenAlvo1 Sep 18, 2024
d119074
fix build errors
BenAlvo1 Sep 18, 2024
941b876
check
BenAlvo1 Sep 18, 2024
c820b4b
linter
BenAlvo1 Sep 18, 2024
9a7d999
linter
BenAlvo1 Sep 18, 2024
0d6736b
linter
BenAlvo1 Sep 18, 2024
4955363
check
BenAlvo1 Sep 18, 2024
16dd3ba
fix download address
BenAlvo1 Sep 18, 2024
cbed05b
check
BenAlvo1 Sep 18, 2024
5a39c5f
fix
BenAlvo1 Sep 18, 2024
16f120d
fix console.error
BenAlvo1 Sep 18, 2024
ce29d03
close file
BenAlvo1 Sep 18, 2024
0127653
check
BenAlvo1 Sep 18, 2024
6dcd31a
check
BenAlvo1 Sep 18, 2024
137ba8e
check
BenAlvo1 Sep 18, 2024
4cfa921
fixing
BenAlvo1 Sep 19, 2024
ae35e16
refactor
BenAlvo1 Sep 22, 2024
1154bd7
add logs to check
BenAlvo1 Sep 22, 2024
191e010
check
BenAlvo1 Sep 22, 2024
91a42a3
check
BenAlvo1 Sep 22, 2024
7989121
check
BenAlvo1 Sep 22, 2024
4ea64c8
add logs
BenAlvo1 Sep 22, 2024
17c57f0
try add semaphore
BenAlvo1 Sep 22, 2024
3589e70
Update executable path
BenAlvo1 Sep 22, 2024
59b31f1
fix exec path config
BenAlvo1 Sep 22, 2024
813f4ac
download zip to tmp dir
BenAlvo1 Sep 22, 2024
7278271
check chmod location
BenAlvo1 Sep 22, 2024
cce52ab
add check.txt to resource
BenAlvo1 Sep 22, 2024
0a0bb62
check
BenAlvo1 Sep 22, 2024
8f667c2
remove download cli script
BenAlvo1 Sep 22, 2024
3fc30fa
refactor
BenAlvo1 Sep 22, 2024
d2d4cd4
refactor
BenAlvo1 Sep 22, 2024
6617877
update package.json
BenAlvo1 Sep 22, 2024
f0c0f7e
upgrade to node 16
BenAlvo1 Sep 22, 2024
056f0c3
refactor
BenAlvo1 Sep 22, 2024
106c992
add delete zip file after extracted
BenAlvo1 Sep 23, 2024
4dc6d3e
optimize dependencies
BenAlvo1 Sep 23, 2024
0d53422
remove unessecary dependency
BenAlvo1 Sep 23, 2024
faf444c
fix
BenAlvo1 Sep 23, 2024
8781a0a
re trigger scan
BenAlvo1 Sep 23, 2024
e850c22
retrigger cx scan
BenAlvo1 Sep 23, 2024
1e7bc84
update cliDefaultVersion to 2.2.6
BenAlvo1 Sep 23, 2024
079cbd8
revert jest.config.js changes
BenAlvo1 Sep 23, 2024
44d50de
revert test package.json data changes
BenAlvo1 Sep 23, 2024
9f56f1a
added README.md to resource directory
BenAlvo1 Sep 23, 2024
bc49577
create resource dir if not exists
BenAlvo1 Sep 23, 2024
2baa423
check
BenAlvo1 Sep 23, 2024
875051b
fix
BenAlvo1 Sep 23, 2024
81063ab
set cli version
BenAlvo1 Sep 23, 2024
4830ef0
include version file in package
BenAlvo1 Sep 23, 2024
b7521a7
check
BenAlvo1 Sep 23, 2024
36cc32c
Update update-cli.yml
BenAlvo1 Sep 23, 2024
aebede7
update github actions
BenAlvo1 Sep 23, 2024
ddbe723
fix package.json
BenAlvo1 Sep 23, 2024
6aec7d2
delete enter
BenAlvo1 Sep 23, 2024
507e4ab
add commit sha
BenAlvo1 Sep 24, 2024
0e29919
Update update-cli.yml
BenAlvo1 Sep 24, 2024
73d02a9
added singleton and factory design patterns to CxWrapper
BenAlvo1 Sep 24, 2024
26f46cc
delete unused set/get config
BenAlvo1 Sep 24, 2024
52e1399
refactor
BenAlvo1 Sep 24, 2024
b31a7e8
remove uneeded semaphore from CxInstaller.ts
BenAlvo1 Sep 24, 2024
e5bf9c7
remove semaphore import
BenAlvo1 Sep 24, 2024
6e69b68
added private and public to CxInstaller functions
BenAlvo1 Sep 24, 2024
3b0311d
make CxWrapper constructor private
BenAlvo1 Sep 24, 2024
feb72f8
added "multiple singleton" - one for each different scan configuratio…
BenAlvo1 Sep 24, 2024
01263d0
fix linter
BenAlvo1 Sep 24, 2024
74f1344
resolve conversations
BenAlvo1 Sep 24, 2024
b541284
delete unecessery clone
BenAlvo1 Sep 24, 2024
8c3ddbb
add comment
BenAlvo1 Sep 24, 2024
ba24745
fix linter
BenAlvo1 Sep 24, 2024
4c0632b
revert delete checkExecutableExists
BenAlvo1 Sep 24, 2024
f0c3cb7
make CxWrapperFactory.ts interface and object
BenAlvo1 Sep 24, 2024
49b1bd0
[create-pull-request] automated change (#16)
OrShamirCM Sep 30, 2024
38d8d0e
[create-pull-request] automated change (#18)
OrShamirCM Oct 1, 2024
3310a07
Revert "[create-pull-request] automated change (#18)"
cx-ben-alvo Oct 1, 2024
642bcfe
[create-pull-request] automated change (#20)
OrShamirCM Oct 1, 2024
3e9f9d3
add getVersionFilePath
BenAlvo1 Oct 6, 2024
a51342b
[create-pull-request] automated change (#22)
OrShamirCM Oct 6, 2024
f812c41
Revert "[create-pull-request] automated change (#22)"
cx-ben-alvo Oct 6, 2024
1b57b61
change to version 1.0.0
BenAlvo1 Oct 6, 2024
c87d2ba
chnage to version 1.0.0
BenAlvo1 Oct 6, 2024
1fa465f
[create-pull-request] automated change (#24)
OrShamirCM Oct 6, 2024
1093c2c
[create-pull-request] automated change (#26)
OrShamirCM Oct 7, 2024
c07ae49
change test execution to be synchronized
BenAlvo1 Nov 10, 2024
a432599
add cliInstalledVersion
BenAlvo1 Nov 10, 2024
16f6b87
add proxy support
BenAlvo1 Nov 10, 2024
76ec28c
implemented httpClient and Client interface. Added arm support for li…
BenAlvo1 Nov 10, 2024
bbcf2d2
refactor getArchitecture
BenAlvo1 Nov 10, 2024
7fa9038
refactor
BenAlvo1 Nov 10, 2024
5c69e44
add tupe to client feild in CxInstaller.ts
BenAlvo1 Nov 10, 2024
426a667
remove unnecessary log
BenAlvo1 Nov 10, 2024
f93cc72
refactor
BenAlvo1 Nov 11, 2024
d94bc85
Added unit tests
BenAlvo1 Nov 11, 2024
0c4d05a
update test
BenAlvo1 Nov 11, 2024
f67154f
fix tests
BenAlvo1 Nov 11, 2024
1470e8d
added astClient
BenAlvo1 Nov 11, 2024
c191e98
[create-pull-request] automated change (#29)
OrShamirCM Nov 12, 2024
3380a49
upgrade cli version
BenAlvo1 Nov 13, 2024
69feb73
comment vorpal tests
BenAlvo1 Nov 13, 2024
af14e53
comment vorpal test
BenAlvo1 Nov 13, 2024
5b0f46d
upgrade to node 20
BenAlvo1 Nov 13, 2024
e46ff3d
fix cxInstaller tests
BenAlvo1 Nov 13, 2024
4a41c65
decrease branches coverage
BenAlvo1 Nov 13, 2024
cf6d1b1
upgrade
cx-sarah-chen Nov 7, 2024
e21a720
Revert "[create-pull-request] automated change (#29)"
cx-ben-alvo Nov 13, 2024
51c0eb6
upgrade cli to 2.3.4
BenAlvo1 Nov 14, 2024
b9aa7c0
[create-pull-request] automated change (#32)
OrShamirCM Nov 14, 2024
d0ec359
[create-pull-request] automated change (#33)
OrShamirCM Nov 14, 2024
3e3d0b0
Update checkmarx-ast-cli to 2.3.5
cx-ben-alvo Nov 18, 2024
a06d27c
[create-pull-request] automated change (#35)
OrShamirCM Nov 18, 2024
c8c1622
[create-pull-request] automated change (#37)
OrShamirCM Nov 18, 2024
19ebf17
Revert "[create-pull-request] automated change (#37)"
cx-ben-alvo Nov 18, 2024
1c3b83a
[create-pull-request] automated change (#39)
OrShamirCM Nov 18, 2024
893ba26
Revert "[create-pull-request] automated change (#39)"
cx-ben-alvo Nov 18, 2024
18831fa
[create-pull-request] automated change (#41)
OrShamirCM Nov 18, 2024
6dacceb
[create-pull-request] automated change (#42)
OrShamirCM Nov 18, 2024
5fc8202
uncomment asca tests
BenAlvo1 Nov 26, 2024
5cc43d8
Merge branch 'other/sync-wrapper'
BenAlvo1 Nov 26, 2024
2d43ac6
Delete .github/workflows/ast-scan.yml
cx-ben-alvo Nov 26, 2024
023cb69
Revert decreasing of brnach coverage
BenAlvo1 Nov 26, 2024
2a6b6b7
CODEOWNERS
BenAlvo1 Nov 27, 2024
38b784b
CODEOWNERS
BenAlvo1 Nov 27, 2024
177726d
Merge pull request #44 from CheckmarxDev/other/benalvo/adding-indicat…
cx-ben-alvo Nov 27, 2024
01c8e9f
[create-pull-request] automated change (#53)
OrShamirCM Nov 27, 2024
d545af0
Merge branch 'main' into other/benalvo/sync-wrapper
cx-ben-alvo Nov 27, 2024
b0b7810
Merge pull request #52 from CheckmarxDev/other/benalvo/sync-wrapper
cx-ben-alvo Nov 28, 2024
00aef25
Update checkmarx-ast-cli to 2.3.6
cx-ben-alvo Dec 3, 2024
5c8267c
Merge pull request #54 from CheckmarxDev/feature/update_cli
cx-ben-alvo Dec 3, 2024
606f4e6
[create-pull-request] automated change (#55)
OrShamirCM Dec 3, 2024
dc100ef
Update checkmarx-ast-cli to 2.3.7
cx-ben-alvo Dec 17, 2024
33fe5c0
Merge pull request #56 from CheckmarxDev/feature/update_cli
cx-ben-alvo Dec 17, 2024
2fc5be9
[create-pull-request] automated change (#57)
cx-ben-alvo Dec 17, 2024
7e90b26
Update checkmarx-ast-cli to 2.3.8
cx-ben-alvo Dec 18, 2024
48333c1
Merge pull request #58 from CheckmarxDev/feature/update_cli
cx-ben-alvo Dec 18, 2024
32778f9
[create-pull-request] automated change (#59)
cx-ben-alvo Dec 18, 2024
05291f4
Update checkmarx-ast-cli to 2.3.9
cx-ben-alvo Dec 31, 2024
c5f573b
Merge pull request #60 from CheckmarxDev/feature/update_cli
cx-ben-alvo Dec 31, 2024
265ac11
[create-pull-request] automated change (#61)
cx-ben-alvo Dec 31, 2024
ba23e76
fix issue to download CLI due to PROXY
cx-miryam-foifer Jan 8, 2025
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
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

32 changes: 0 additions & 32 deletions .github/scripts/update_cli.sh

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/ast-scan.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Install Git LFS
run: |
sudo apt-get update
sudo apt-get install git-lfs
git lfs install

- name: Use Node.js 22.11.0
uses: actions/setup-node@v4.0.2
with:
Expand All @@ -25,24 +16,6 @@ jobs:
run: npm run lint
- run: npm run build --if-present

- name: Check existence of cx-linux binary
run: |
if [ ! -f "src/main/wrapper/resources/cx-linux" ]; then
echo "cx-linux binary does not exist"; exit 1;
fi

- name: Check existence of cx.exe binary
run: |
if [ ! -f "src/main/wrapper/resources/cx.exe" ]; then
echo "cx.exe binary does not exist"; exit 1;
fi

- name: Check existence of cx-mac binary
run: |
if [ ! -f "src/main/wrapper/resources/cx-mac" ]; then
echo "cx-mac binary does not exist"; exit 1;
fi

- name: Run tests
env:
CX_CLIENT_ID: ${{ secrets.CX_CLIENT_ID}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/delete-packages-and-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:

echo "Deleting all npm packages whose name ends with '-${{inputs.tag}}.0'"

VERSION_IDS=($(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/orgs/CheckmarxDev/packages/npm/ast-cli-javascript-wrapper/versions | jq '.[]|select(.name | contains("-${{inputs.tag}}.0"))|.id'))
VERSION_IDS=($(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/orgs/CheckmarxDev/packages/npm/ast-cli-javascript-wrapper-runtime-cli/versions | jq '.[]|select(.name | contains("-${{inputs.tag}}.0"))|.id'))

for versionId in "${VERSION_IDS[@]}"
do
echo "Deleting version $versionId..."
curl -L -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/orgs/CheckmarxDev/packages/npm/ast-cli-javascript-wrapper/versions/$versionId"
curl -L -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/orgs/CheckmarxDev/packages/npm/ast-cli-javascript-wrapper-runtime-cli/versions/$versionId"
echo "Version $versionId deleted successfully!"
done

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ on:

jobs:
nightly:
uses: CheckmarxDev/ast-cli-javascript-wrapper/.github/workflows/release.yml@main
uses: CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/.github/workflows/release.yml@main
secrets: inherit
11 changes: 1 addition & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ permissions:

jobs:
delete:
uses: CheckmarxDev/ast-cli-javascript-wrapper/.github/workflows/delete-packages-and-releases.yml@main
uses: CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/.github/workflows/delete-packages-and-releases.yml@main
with:
tag: ${{ inputs.jsTag }}
secrets: inherit
Expand All @@ -58,7 +58,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true # Ensure LFS files are checked out

# GIT CONFIGURATION
- run: |
Expand All @@ -80,14 +79,6 @@ jobs:
echo "TAG_NAME=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV
fi

# DOWNLOAD CLI IF IT IS A DEV VERSION AND A CLI TAG WAS PROVIDED
- name: Download cli with tag ${{ inputs.cliTag }}
if: inputs.dev == true && inputs.cliTag != ''
run: |
# Update binaries
chmod +x ./.github/scripts/update_cli.sh
./.github/scripts/update_cli.sh ${{ inputs.cliTag }}

# RUN NPM INSTALL AND BUILD
- name: NPM ci and build
run: |
Expand Down
58 changes: 26 additions & 32 deletions .github/workflows/update-cli.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,53 @@
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
with:
lfs: true

- name: Install Git LFS
run: |
sudo apt-get update
sudo apt-get install git-lfs
git lfs install

- name: Configure Git user
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com

# Fetch the latest Checkmarx AST CLI version
- name: Get Latest Checkmarx API version
id: checkmarx-ast-cli
run: |
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)
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

- name: Update Checkmarx cli version
# Update the version file if the latest version differs
- name: Update Checkmarx CLI version in version file
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

- name: Download latest cli and update branch
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
run: |
# Update binaries
chmod +x ./.github/scripts/update_cli.sh
./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}

- name: Track large files with Git LFS
# 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: |
git lfs track "src/main/wrapper/resources/cx-linux"
git lfs track "src/main/wrapper/resources/cx.exe"
git lfs track "src/main/wrapper/resources/cx-mac"
git add .gitattributes
git add src/main/wrapper/resources/cx-linux src/main/wrapper/resources/cx.exe src/main/wrapper/resources/cx-mac
git commit -m "Track Checkmarx CLI binaries with Git LFS"
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 CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Each line is a file pattern followed by one or more owners

# Specify the default owners for the entire repository
* @OrShamirCM @AlvoBen @pedrompflopes
* @OrShamirCM @AlvoBen @pedrompflopes @miryamfoiferCX
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<img src="./logo.png" alt="Logo" width="80" height="80">
</a>

<h3 align="center">AST-CLI-JAVASCRIPT-WRAPPER</h3>
<h3 align="center">AST-CLI-JAVASCRIPT-WRAPPER-RUNTIME-CLI</h3>

<!-- TABLE OF CONTENTS -->
<details open="open">
Expand Down Expand Up @@ -40,7 +40,7 @@ Add the following dependency:

```
"dependencies": {
"@checkmarxdev/ast-cli-javascript-wrapper": "{version}"
"@checkmarxdev/ast-cli-javascript-wrapper-runtime-cli": "{version}"
}
```

Expand Down Expand Up @@ -86,7 +86,7 @@ setx PATH_TO_EXECUTABLE {value}

Checkmarx - AST Integrations Team

CxProject Link: [https://github.com/CheckmarxDev/ast-cli-javascript-wrapper](https://github.com/CheckmarxDev/ast-cli-javascript-wrapper)
CxProject Link: [https://github.com/CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli](https://github.com/CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli)


© 2021 Checkmarx Ltd. All Rights Reserved.
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.3.9
Loading