Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
390 commits
Select commit Hold shift + click to select a range
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
21ba6c7
fix issue to download CLI due to PROXY
cx-miryam-foifer Jan 9, 2025
a76f69b
install proxy agent
cx-miryam-foifer Jan 9, 2025
a4e9ec7
fix compilation error
cx-miryam-foifer Jan 9, 2025
c99fdb8
Merge pull request #62 from CheckmarxDev/bug/miryamFoifer/proxyAgent3
cx-ben-alvo Jan 21, 2025
b2b2667
[create-pull-request] automated change (#64)
cx-ben-alvo Jan 21, 2025
d7f0ebe
Update checkmarx-ast-cli to 2.3.12
cx-daniel-greenspan Jan 27, 2025
6848047
Merge pull request #65 from CheckmarxDev/feature/update_cli
cx-daniel-greenspan Jan 27, 2025
3022c03
[create-pull-request] automated change (#66)
cx-ben-alvo Jan 27, 2025
2bcc0bd
Add release notify step (AST-000)
cx-daniel-greenspan Feb 4, 2025
2f1f071
commit
cx-daniel-greenspan Feb 4, 2025
b285553
tag
cx-daniel-greenspan Feb 4, 2025
23f8bfd
commit
cx-daniel-greenspan Feb 4, 2025
4087bbd
u[date tests threshold
cx-daniel-greenspan Feb 4, 2025
8de0b85
Merge pull request #68 from CheckmarxDev/add-release-notify
cx-daniel-greenspan Feb 4, 2025
a3c5232
replace axios with azure tool lib requests
BenAlvo1 Feb 5, 2025
2011ad4
add dependencies
BenAlvo1 Feb 5, 2025
c92b7a5
fix errors
BenAlvo1 Feb 5, 2025
703ac82
refactor
BenAlvo1 Feb 6, 2025
ee9fce7
add retry to download cli
BenAlvo1 Feb 6, 2025
2108f82
delete axios dependency
BenAlvo1 Feb 6, 2025
69392eb
revert delete async-mutex
BenAlvo1 Feb 6, 2025
bc5f4cc
Change CODEOWNERS
BenAlvo1 Feb 6, 2025
1bedac5
Merge pull request #69 from CheckmarxDev/fix/benalvo/change-axios-to-…
cx-ben-alvo Feb 6, 2025
ae108e5
[create-pull-request] automated change (#70)
cx-ben-alvo Feb 6, 2025
0966599
Update checkmarx-ast-cli to 2.3.14
cx-ben-alvo Feb 13, 2025
67f6a4a
Merge pull request #71 from CheckmarxDev/feature/update_cli
cx-ben-alvo Feb 13, 2025
ddfad8e
[create-pull-request] automated change (#72)
cx-ben-alvo Feb 13, 2025
9be7fce
Add update cli version from dispatch (AST-000)
cx-daniel-greenspan Mar 3, 2025
584652f
create unique branch name in update flow (AST-000)
cx-daniel-greenspan Mar 3, 2025
ffeb288
Merge PR when update via repo dispatch (AST-000)
cx-daniel-greenspan Mar 9, 2025
0b9fc79
approve pr automatically if update cli is succesfull
cx-daniel-greenspan Mar 9, 2025
4b8ce64
add auto merge
cx-daniel-greenspan Mar 9, 2025
b5e544a
change condition
cx-daniel-greenspan Mar 9, 2025
960201b
remove dependabot
cx-daniel-greenspan Mar 9, 2025
71d0179
chnage creds
cx-daniel-greenspan Mar 9, 2025
cc12b63
Update checkmarx-ast-cli to 2.3.15
cx-daniel-greenspan Mar 9, 2025
02ee9e4
chnage syntax
cx-daniel-greenspan Mar 9, 2025
2316f63
Merge branch 'main' into feature/update_cli_2.3.15
cx-daniel-greenspan Mar 9, 2025
a0fd474
Merge pull request #78 from CheckmarxDev/feature/update_cli_2.3.15
cx-daniel-greenspan Mar 9, 2025
1b8e9b9
Update checkmarx-ast-cli to 2.3.16
cx-daniel-greenspan Mar 11, 2025
a27504a
Merge pull request #79 from CheckmarxDev/feature/update_cli_2.3.16
cx-daniel-greenspan Mar 11, 2025
f20db68
[create-pull-request] automated change (#80)
cx-ben-alvo Mar 11, 2025
5068297
Update ADO with new release (AST-000)
cx-daniel-greenspan Mar 18, 2025
3f334ff
chnage token
cx-daniel-greenspan Mar 18, 2025
b3b6388
fix proxy handeler and add unit test
cx-itay-paz Apr 1, 2025
9f3f4f6
fix test
cx-itay-paz Apr 1, 2025
4d92e67
remove coverage from unit
cx-itay-paz Apr 1, 2025
53efb3a
fix coverage in unit again
cx-itay-paz Apr 1, 2025
6593c16
fix vulnerbailits
cx-itay-paz Apr 1, 2025
6fba170
use npm ci
cx-itay-paz Apr 1, 2025
c0f7e90
update vs tester version
cx-itay-paz Apr 1, 2025
02e8776
try to fix vulnerbilites
cx-itay-paz Apr 1, 2025
27d7187
make proxy port as number
cx-itay-paz Apr 3, 2025
bb18f05
Merge pull request #82 from CheckmarxDev/other/fix-proxy-handler
cx-itay-paz Apr 3, 2025
6d6df18
Update checkmarx-ast-cli to 2.3.18
cx-daniel-greenspan Apr 6, 2025
544c812
Merge pull request #83 from CheckmarxDev/feature/update_cli_2.3.18
cx-daniel-greenspan Apr 6, 2025
250856a
[create-pull-request] automated change (#84)
cx-ben-alvo Apr 6, 2025
063fdeb
Update checkmarx-ast-cli to 2.3.19
cx-daniel-greenspan Apr 17, 2025
0cf05b0
Merge pull request #85 from CheckmarxDev/feature/update_cli_2.3.19
cx-daniel-greenspan Apr 17, 2025
62eb634
[create-pull-request] automated change (#86)
cx-ben-alvo Apr 17, 2025
0a0dd1e
Update checkmarx-ast-cli to 2.3.20
cx-daniel-greenspan Apr 28, 2025
d008c33
Merge pull request #87 from CheckmarxDev/feature/update_cli_2.3.20
cx-daniel-greenspan May 8, 2025
f865df5
[create-pull-request] automated change (#88)
cx-ben-alvo May 8, 2025
375f517
Update checkmarx-ast-cli to 2.3.21
cx-daniel-greenspan May 26, 2025
7e23ab8
Merge pull request #89 from CheckmarxDev/feature/update_cli_2.3.21
cx-daniel-greenspan May 26, 2025
76b4f3f
Update checkmarx-ast-cli to 2.3.22
cx-daniel-greenspan Jun 4, 2025
d0beced
Merge pull request #93 from CheckmarxDev/feature/update_cli_2.3.22
cx-daniel-greenspan Jun 4, 2025
4fa5a78
[create-pull-request] automated change (#94)
cx-ben-alvo Jun 5, 2025
62efd27
Update checkmarx-ast-cli to 2.3.23
cx-daniel-greenspan Jun 11, 2025
820bd82
Merge pull request #95 from CheckmarxDev/feature/update_cli_2.3.23
cx-daniel-greenspan Jun 11, 2025
35147ec
Update checkmarx-ast-cli to 2.3.24
cx-daniel-greenspan Jun 12, 2025
be9fb7c
Merge pull request #96 from CheckmarxDev/feature/update_cli_2.3.24
cx-daniel-greenspan Jun 12, 2025
19e37b5
Update checkmarx-ast-cli to 2.3.25
cx-daniel-greenspan Jun 20, 2025
7476939
Merge pull request #97 from CheckmarxDev/feature/update_cli_2.3.25
cx-daniel-greenspan Jun 20, 2025
8d6d30c
Update checkmarx-ast-cli to 2.3.26
cx-daniel-greenspan Jun 29, 2025
3b74914
Merge pull request #98 from CheckmarxDev/feature/update_cli_2.3.26
cx-daniel-greenspan Jun 29, 2025
310aa42
Update checkmarx-ast-cli to 2.3.27
cx-daniel-greenspan Jul 4, 2025
0ed248f
Merge pull request #99 from CheckmarxDev/feature/update_cli_2.3.27
cx-daniel-greenspan Jul 4, 2025
e2ab6ca
[create-pull-request] automated change (#100)
cx-ben-alvo Jul 9, 2025
3c4b610
Add a test if the updated CLI version is the latest released version.
Jul 22, 2025
bdb813f
Did the changes for negative test
Jul 22, 2025
872e018
Did the changes for positive test
Jul 22, 2025
419d120
Add a check to ensure that the latest CLI version is verified only fo…
Jul 22, 2025
04cc64a
test positive
Jul 23, 2025
9ff1361
revert changes
Jul 23, 2025
6847a7a
Update checkmarx-ast-cli to 2.3.28
cx-daniel-greenspan Jul 24, 2025
7e53c0e
Merge pull request #104 from CheckmarxDev/feature/update_cli_2.3.28
cx-daniel-greenspan Jul 24, 2025
99f2160
Merge branch 'main' into other/AST-104242
cx-margarita-levitm Jul 29, 2025
154a670
Merge pull request #103 from CheckmarxDev/other/AST-104242
cx-margarita-levitm Jul 29, 2025
211be73
Update checkmarx-ast-cli to 2.3.29
cx-daniel-greenspan Jul 31, 2025
96d6bb5
Merge pull request #105 from CheckmarxDev/feature/update_cli_2.3.29
cx-daniel-greenspan Aug 5, 2025
395925d
Update checkmarx-ast-cli to 2.3.30
cx-anurag-dalke Aug 12, 2025
a4ff043
Merge pull request #106 from CheckmarxDev/feature/update_cli_2.3.30
cx-daniel-greenspan Aug 12, 2025
e53b4eb
Update checkmarx-ast-cli to 2.3.31
cx-anurag-dalke Aug 18, 2025
4d73396
Merge pull request #107 from CheckmarxDev/feature/update_cli_2.3.31
cx-daniel-greenspan Aug 18, 2025
8a49091
[create-pull-request] automated change (#108)
cx-ben-alvo Aug 20, 2025
96472a0
Update checkmarx-ast-cli to 2.3.32
cx-anurag-dalke Aug 21, 2025
762253c
Merge pull request #109 from CheckmarxDev/feature/update_cli_2.3.32
cx-anurag-dalke Aug 22, 2025
eb48149
Update checkmarx-ast-cli to 2.3.33
cx-anurag-dalke Aug 29, 2025
965274f
Merge pull request #110 from CheckmarxDev/feature/update_cli_2.3.33
cx-anurag-dalke Aug 29, 2025
d7958af
[create-pull-request] automated change (#111)
cx-ben-alvo Aug 29, 2025
82d984c
Update checkmarx-ast-cli to 2.3.36
cx-anurag-dalke Sep 29, 2025
a684ad1
Merge pull request #112 from CheckmarxDev/feature/update_cli_2.3.36
cx-anurag-dalke Sep 29, 2025
753e9db
[create-pull-request] automated change (#113)
cx-ben-alvo Sep 29, 2025
d7ef015
Update package.json
cx-rahul-pidde Oct 10, 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.

20 changes: 20 additions & 0 deletions .github/workflows/auto-merge-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Post-Check Actions
on: [pull_request]

permissions:
contents: write

jobs:
dependabot-merge:
runs-on: ubuntu-latest
if: contains(github.head_ref, 'feature/update_cli')
steps:
- name: Enable auto-merge for Dependabot PRs
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN }}
run: gh pr merge --auto --merge "$PR_URL"
- name: Auto approve dependabot PRs
uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 #v4
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
78 changes: 32 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,39 @@
name: AST Javascript wrapper CI

on: [pull_request]
on: [ pull_request ]
jobs:
integration-tests:
unit-tests:
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/[email protected]
with:
node-version: 22.11.0
registry-url: https://npm.pkg.github.com/
- run: npm ci
- name: Code Linting
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
- uses: actions/checkout@v4
- name: Use Node.js 22.11.0
uses: actions/[email protected]
with:
node-version: 22.11.0
registry-url: https://npm.pkg.github.com/
- run: npm ci
- name: Run Unit Tests

- 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
run: npm run test:unit
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.11.0
uses: actions/[email protected]
with:
node-version: 22.11.0
registry-url: https://npm.pkg.github.com/
- run: npm ci
- name: Code Linting
run: npm run lint
- run: npm run build --if-present

- name: Run tests
env:
CX_CLIENT_ID: ${{ secrets.CX_CLIENT_ID}}
CX_CLIENT_SECRET: ${{ secrets.CX_CLIENT_SECRET}}
CX_BASE_URI: ${{ secrets.CX_BASE_URI }}
CX_TENANT: ${{ secrets.CX_TENANT }}
CX_APIKEY: ${{ secrets.CX_APIKEY }}
run: npm test
- name: Run tests
env:
CX_CLIENT_ID: ${{ secrets.CX_CLIENT_ID}}
CX_CLIENT_SECRET: ${{ secrets.CX_CLIENT_SECRET}}
CX_BASE_URI: ${{ secrets.CX_BASE_URI }}
CX_TENANT: ${{ secrets.CX_TENANT }}
CX_APIKEY: ${{ secrets.CX_APIKEY }}
run: npm test
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
89 changes: 61 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Javascript Wrapper Release

on:
Expand Down Expand Up @@ -42,59 +41,75 @@ 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
if: inputs.dev == true
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }}
BRANCH_NAME: npm-version-patch
GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }}
BRANCH_NAME: npm-version-patch
outputs:
TAG_NAME: ${{ steps.generate_tag_name.outputs.TAG_NAME }}
CLI_VERSION: ${{ steps.extract_cli_version.outputs.CLI_VERSION }}
steps:

# CHECKOUT PROJECT
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true # Ensure LFS files are checked out

# GIT CONFIGURATION
- run: |
- name: Git Configuration
run: |
git config user.name github-actions
git config user.email [email protected]

# SETUP NODE
- uses: actions/[email protected]
with:
node-version: 22.11.0
registry-url: https://npm.pkg.github.com/

# GET TAG NAME
- name: Generate Tag name
id: generate_tag_name
run: |
if [ ${{ inputs.dev }} == true ]; then
echo "TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)" >> $GITHUB_ENV
if [ "${{ inputs.dev }}" == "true" ]; then
TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)
else
echo "TAG_NAME=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV
TAG_NAME=$(npm version patch --no-git-tag-version)
fi

echo "Generated TAG_NAME: $TAG_NAME"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "::set-output name=TAG_NAME::$TAG_NAME"

- name: Extract CLI version
id: extract_cli_version
run: |
CLI_VERSION=$(cat checkmarx-ast-cli.version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
echo "CLI version being packed is $CLI_VERSION"
echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
echo "::set-output name=CLI_VERSION::$CLI_VERSION"

# 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 != ''
- name: Check if CLI version is latest
id: check_latest_cli_version
run: |
# Update binaries
chmod +x ./.github/scripts/update_cli.sh
./.github/scripts/update_cli.sh ${{ inputs.cliTag }}
if [ "${{ inputs.dev }}" == "false" ] || [ -n "${{ inputs.cliTag }}" ] || [ "${{ github.ref }}" != "refs/heads/main" ]; then
exit 0
fi

LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [ "$CLI_VERSION" = "$LATEST_CLI_VERSION" ]; then
echo "Confirm that the CLI version in the repository is up-to-date with the most recent release: $CLI_VERSION"
else
echo "The current repository contains a CLI version that differs from the latest released version: Expected $LATEST_CLI_VERSION, got $CLI_VERSION"
exit 1
fi

# RUN NPM INSTALL AND BUILD
- name: NPM ci and build
run: |
npm ci
npm run build

# CREATE PR FOR VERSION
- name: Create Pull Request
id: create_pr
if: inputs.dev == false
Expand All @@ -107,32 +122,27 @@ jobs:
base: main
draft: false

# WAIT FOR PR CREATION
- name: Wait for PR to be created
id: pr
if: inputs.dev == false
uses: octokit/request-action@872c5c97b3c85c23516a572f02b31401ef82415d #v2.3.1
with:
route: GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }}

# MERGE PR TO MAIN
- name: Merge Pull Request
if: inputs.dev == false
uses: octokit/request-action@872c5c97b3c85c23516a572f02b31401ef82415d #v2.3.1
with:
route: PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge
merge_method: squash

# PUSH TAGS IF IT IS A RELEASE
- name: Push tag
if: inputs.dev == false
run: |
git pull
git tag ${{env.TAG_NAME}}
git push --tags


# PUBLISH NPM PACKAGE
- name: Publish npm package
run: |
if [ ${{ inputs.dev }} == true ]; then
Expand All @@ -143,11 +153,34 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}

# CREATE RELEASE
- name: Create Release
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 #v2
with:
name: ${{env.TAG_NAME}}
tag_name: ${{env.TAG_NAME}}
generate_release_notes: true
prerelease: ${{ inputs.dev }}

notify:
if: inputs.dev == false
needs: release
uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
with:
product_name: Javascript Runtime Wrapper
release_version: ${{ needs.release.outputs.TAG_NAME }}
cli_release_version: ${{ needs.release.outputs.CLI_VERSION }}
release_author: "Phoenix Team"
release_url: https://github.com/CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/releases/tag/${{ needs.release.outputs.TAG_NAME }}
jira_product_name: JS_RUNTIME_WRAPPER
secrets: inherit

dispatch_auto_release:
name: Update ADO Extension With new Wrapper Version
if: inputs.dev == false
needs: notify
uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main
with:
cli_version: ${{ needs.release.outputs.CLI_VERSION }}
is_cli_release: false
is_js_runtime_release: true
secrets: inherit
Loading
Loading