1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-16 05:16:08 +02:00
Commit Graph

4961 Commits

Author SHA1 Message Date
Simon Dold
eeaeb1e40b
Adding general scope to logOutput (#5189)
* adding general scope

* change generated files

---------

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2024-11-28 09:38:25 +00:00
thtri
cd20114ca4
CxONE: search project name by exact match (#5187)
* Initial in progress

* compiling but not yet functional

* Missed file

* updated checkmarxone step

* Working up to fetching a project then breaks

* Missed file

* Breaks when retrieving projects+proxy set

* Create project & run scan working, now polling

* Fixed polling

* added back the zipfile remove command

* Fixed polling again

* Generates and downloads PDF report

* Updated and working, prep for refactor

* Added compliance steps

* Cleanup, reporting, added groovy connector

* fixed groovy file

* checkmarxone to checkmarxOne

* checkmarxone to checkmarxOne

* split credentials (id+secret, apikey), renamed pullrequestname to branch, groovy fix

* Fixed filenames & yaml

* missed the metadata_generated.go

* added json to sarif conversion

* fix:type in new checkmarxone package

* fix:type in new checkmarxone package

* removed test logs, added temp error log for creds

* extra debugging to fix crash

* improved auth logging, fixed query parse issue

* fixed bug with group fetch when using oauth user

* CWE can be -1 if not defined, can't be uint

* Query also had CweID

* Disabled predicates-fetch in sarif generation

* Removing leftover info log message

* Better error handling

* fixed default preset configuration

* removing .bat files - sorry

* Cleanup per initial review

* refactoring per Gist, fixed project find, add apps

* small fix - sorry for commit noise while testing

* Fixing issues with incremental scans.

* removing maxretries

* Updated per PR feedback, further changes todo toda

* JSON Report changes and reporting cleanup

* removing .bat (again?)

* adding docs, groovy unit test, linter fixes

* Started adding tests maybe 15% covered

* fix(checkmarxOne): test cases for pkg and reporting

* fix(checkmarxOne):fix formatting

* feat(checkmarxone): update interface with missing method

* feat(checkmarxone):change runStep signature to be able to inject dependency

* feat(checkmarxone): add tests for step (wip)

* Adding a bit more coverage

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix integration test PR

* adding scan-summary bug workaround, reportgen fail

* enforceThresholds fix when no results passed in

* fixed gap when preset empty in yaml & project conf

* fixed another gap in preset selection

* fix 0-result panic

* fail when no preset is set anywhere

* removed comment

* initial project-under-app support

* fixing sarif reportgen

* some cleanup of error messages

* post-merge test fixes

* revert previous upstream merge

* adding "incremental" to "full" triggers

* wrong boolean

* project-in-application api change prep

* Fixing SARIF report without preset access

* fix sarif deeplink

* removing comments

* fix(cxone):formatting

* fix(cxone):formatting

* small sarif fixes

* fixed merge

* attempt at pulling git source repo branch

* fix(cxone):new endpoint for project creation

* fix(cxOne): taxa is an array

* fix(cxOne): get Git branch from commonPipelineEnvironment

* fix(cxOne): add params to tag a scan and a project

* fix(cxOne): unit test - update project

* fix(cxOne): unit test - update project tags

* fix(cxOne): improve logs

* fix(cxOne): improve logs

* adding RequestNewPDFReport function using v2 api

* added version check

* fix(cxone): JSON report using v2 API

* update to set reportType in v2 reportgen

* fix(checkmarxOneExecuteScan): remove absolute patch for code preview

* fix(checkmarxOneExecuteScan): remove SCA confusion from driver name

* fix(checkmarxOneExecuteScan): search project name by exact match

* fix(checkmarxOneExecuteScan): escape branch name in deeplink

* fix(checkmarxOneExecuteScan): fix format

---------

Co-authored-by: michael kubiaczyk <michael.kubiaczyk@checkmarx.com>
Co-authored-by: michaelkubiaczyk <48311127+michaelkubiaczyk@users.noreply.github.com>
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
Co-authored-by: Adrien <99400874+hubadr@users.noreply.github.com>
2024-11-27 15:54:19 +01:00
Manjunath
62a5eda322
Updated help from 3.14.2 to 3.14.4 (#5188) 2024-11-27 13:57:54 +01:00
Manjunath
2493687e16
Updated all instances of circl to 1.3.7 (#5186) 2024-11-27 13:13:53 +01:00
maxcask
91823b9e08
fix(config): move Central Build stage config to Build stage for custom defaults (#5182)
* rename stage on ApplyAliasConfig func rename stage after applying alias

---------

Co-authored-by: maxcask <maxcask@gmail.com>
Co-authored-by: Googlom <alimovgb@gmail.com>
2024-11-27 11:48:54 +04:00
Christopher Fenner
e462d324e4
fix(docs): fix doc anchor (#5177)
* Update fortifyExecuteScan.yaml

* Update whitesourceExecuteScan.yaml

* Update protecodeExecuteScan.yaml

* Update sonarExecuteScan.yaml

* Update detectExecuteScan.yaml

* Update fortifyExecuteScan_generated.go
2024-11-27 08:16:27 +01:00
Manjunath
9bcf8ee50c
Update circl from 1.3.3 to 1.5.0 (#5185) 2024-11-26 15:15:10 +01:00
Manjunath
cd548193a0
Renamed maven simple bom to skip uploading to cumulus (#5180) 2024-11-22 14:04:12 +01:00
Googlom
f044ef106d
fix(curl): Remove --insecure flag from curl when downlaoding Piper binary (#5179)
* remove --insecure flag from binary download

* remove --insecure flag from binary download

* adjust unit tests
2024-11-21 13:30:03 +05:00
maxcask
10f535c8fa
fix handle new naming strategy for Central Build stage name if extension is used (#5178)
* handle extension filename

---------

Co-authored-by: maxcask <maxcask@gmail.com>
Co-authored-by: Googlom <alimovgb@gmail.com>
2024-11-19 11:58:55 +04:00
Ralf Pannemans
f54dbfd433
Remove commit message from project-metadata.toml (#5176) 2024-11-18 09:51:35 +01:00
maxcask
758d10b06e
handle new naming strategy for Central Build stage name (#5171)
* config helper rename

* rename in name provider 
---------

Co-authored-by: maxcask <maxcask@gmail.com>
2024-11-12 15:33:38 +04:00
christian
1edf8299f3
Update URL to current SapMachine (#5126)
* Update URL to recent SapMachine

11.0.2 in from Jan2019 := 5 years old
use the recent version => 11.0.24

* 11.0.24 to 25

meanwhile 11.0.25 is the latest version

* update from 11.0.25 to stable 21 link

now to use https://sap.github.io/SapMachine/latest/21/linux-x64/jre/

* applied generated go code

* Update whitesourceExecuteScan.yaml

* from 21-latest to 17.0.13

to speed this up

* revert description

* generate for new url

---------

Co-authored-by: Harald Aamot <harald.aamot@sap.com>
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2024-11-08 09:40:51 +01:00
Adrien
9626bfca0d
checkmarxOneExecuteScan - Fix report generation in CxOne 3.20 (#5170)
* Initial in progress

* compiling but not yet functional

* Missed file

* updated checkmarxone step

* Working up to fetching a project then breaks

* Missed file

* Breaks when retrieving projects+proxy set

* Create project & run scan working, now polling

* Fixed polling

* added back the zipfile remove command

* Fixed polling again

* Generates and downloads PDF report

* Updated and working, prep for refactor

* Added compliance steps

* Cleanup, reporting, added groovy connector

* fixed groovy file

* checkmarxone to checkmarxOne

* checkmarxone to checkmarxOne

* split credentials (id+secret, apikey), renamed pullrequestname to branch, groovy fix

* Fixed filenames & yaml

* missed the metadata_generated.go

* added json to sarif conversion

* fix:type in new checkmarxone package

* fix:type in new checkmarxone package

* removed test logs, added temp error log for creds

* extra debugging to fix crash

* improved auth logging, fixed query parse issue

* fixed bug with group fetch when using oauth user

* CWE can be -1 if not defined, can't be uint

* Query also had CweID

* Disabled predicates-fetch in sarif generation

* Removing leftover info log message

* Better error handling

* fixed default preset configuration

* removing .bat files - sorry

* Cleanup per initial review

* refactoring per Gist, fixed project find, add apps

* small fix - sorry for commit noise while testing

* Fixing issues with incremental scans.

* removing maxretries

* Updated per PR feedback, further changes todo toda

* JSON Report changes and reporting cleanup

* removing .bat (again?)

* adding docs, groovy unit test, linter fixes

* Started adding tests maybe 15% covered

* fix(checkmarxOne): test cases for pkg and reporting

* fix(checkmarxOne):fix formatting

* feat(checkmarxone): update interface with missing method

* feat(checkmarxone):change runStep signature to be able to inject dependency

* feat(checkmarxone): add tests for step (wip)

* Adding a bit more coverage

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix integration test PR

* adding scan-summary bug workaround, reportgen fail

* enforceThresholds fix when no results passed in

* fixed gap when preset empty in yaml & project conf

* fixed another gap in preset selection

* fix 0-result panic

* fail when no preset is set anywhere

* removed comment

* initial project-under-app support

* fixing sarif reportgen

* some cleanup of error messages

* post-merge test fixes

* revert previous upstream merge

* adding "incremental" to "full" triggers

* wrong boolean

* project-in-application api change prep

* Fixing SARIF report without preset access

* fix sarif deeplink

* removing comments

* fix(cxone):formatting

* fix(cxone):formatting

* small sarif fixes

* fixed merge

* attempt at pulling git source repo branch

* fix(cxone):new endpoint for project creation

* fix(cxOne): taxa is an array

* fix(cxOne): get Git branch from commonPipelineEnvironment

* fix(cxOne): add params to tag a scan and a project

* fix(cxOne): unit test - update project

* fix(cxOne): unit test - update project tags

* fix(cxOne): improve logs

* fix(cxOne): improve logs

* adding RequestNewPDFReport function using v2 api

* added version check

* fix(cxone): JSON report using v2 API

* update to set reportType in v2 reportgen

---------

Co-authored-by: michael kubiaczyk <michael.kubiaczyk@checkmarx.com>
Co-authored-by: thtri <trinhthanhhai@gmail.com>
Co-authored-by: Thanh-Hai Trinh <thanh.hai.trinh@sap.com>
Co-authored-by: michaelkubiaczyk <48311127+michaelkubiaczyk@users.noreply.github.com>
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-11-07 15:14:04 +01:00
phgermanov
c1e800a770
docs: update pr template to include inner source update reminder (#5169) 2024-11-06 12:51:14 +02:00
Manjunath
364238f154
handle error while fetching working directory (#5168) 2024-11-04 14:20:37 +01:00
Holger Partsch
d4e298464e
Final round of adding quoting to prevent command injection (#5167)
* refactor: use import alias

* fix: add quoting to further shell steps
2024-11-04 14:05:47 +01:00
phgermanov
6988f43f7f
feat: add build artifacts metadata for mtaBuild (#5166) 2024-11-04 12:30:39 +02:00
Holger Partsch
da609e1536
Fix more potential command injection via quoting (#5164)
* fix: make quoting null safe

* fix: apply quoting in artifact set version

* fix: add quoting to more shell step

* refactor: use import alias

* fix: further quoting

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2024-10-30 11:59:47 +01:00
Manjunath
183004a80d
Add identifier data to create uuid in events (#5165) 2024-10-29 08:39:34 +01:00
Vyacheslav Starostin
d6aaf43fae
Update version of org.cyclonedx:cyclonedx-maven-plugin (#5156)
* Update version of org.cyclonedx:cyclonedx-maven-plugin

* Update version of org.cyclonedx:cyclonedx-maven-plugin

---------

Co-authored-by: Googlom <36107508+Googlom@users.noreply.github.com>
2024-10-25 14:07:28 +05:00
Srinikitha Kondreddy
f9dc47e47e
Fix: validate app name (#5155) 2024-10-25 09:53:55 +02:00
Holger Partsch
8b4109bf85
fix: command injection vulnerability (#5161)
due to missing quoting, command injection was possible via
pipeline configuration.

This is now fixed using a quoting and escaping utility.

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2024-10-24 17:29:40 +02:00
Googlom
0c41f9c141
fix deadlock and add more logging (#5160) 2024-10-24 14:08:09 +05:00
Googlom
4990b2d0ba
fix(sonar): allign groovy part of Sonar step with common piperExecuteBin (#5157)
* add some logging to Vault login

* allign groovy part of the sonar step

* Revert "add some logging to Vault login"

This reverts commit d1738c124d.
2024-10-24 09:47:32 +02:00
Googlom
7b7ba77436
modify logging (#5158) 2024-10-23 17:32:37 +05:00
Akramdzhon Azamov
7b08d47bcb
Detect script version 9 (#5154)
* detect script v9 as default and detect script v8 as optional for blackduck

* unit test fix

---------

Co-authored-by: Dmitrii Pavlukhin <dmitrii.pavlukhin@sap.com>
2024-10-23 12:09:15 +03:00
Anil Keshav
3ad2628095
feat(vault): not allowing batch token revoke (#4918)
* not allowing batch token revoke

* chaging values to hold variable name

* error message when identifying service token

* refactor

---------

Co-authored-by: Googlom <alimovgb@gmail.com>
2024-10-22 13:50:32 +05:00
Googlom
5c47be3f8f
refactor(vault): Refactor vault package (#5148)
* move to old package

* go mod

* remove old

* refactor done

* Update pkg/vault/oidc.go

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* commit suggestions

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* commit suggestions

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* commit suggestions

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2024-10-22 13:29:34 +05:00
maxcask
4eb1756b54
fix(Central Build): Fix handling legacy stage name for Jenkins pipelines (#5151)
* add handle stageName

* some improvements

---------

Co-authored-by: maxcask <maxcask@gmail.com>
Co-authored-by: Googlom <alimovgb@gmail.com>
Co-authored-by: Googlom <36107508+Googlom@users.noreply.github.com>
2024-10-21 12:23:50 +04:00
Dmitrii Pavlukhin
769067e996
added-option-to-use-global-config-file (#5145) 2024-10-18 17:06:41 +03:00
Adrien
b317b1d1eb
Add debug log for zip file content (#5152)
Co-authored-by: thtri <thanh.hai.trinh@sap.com>
2024-10-17 17:16:14 +02:00
Ivan Nikiforov
34a60daad1
Update documentation for scriptArguments param (#5128)
* Update documentation for scriptArguments param

* Update resources/metadata/shellExecute.yaml

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* Update doc with new examples

* Fix typo

---------

Co-authored-by: Ivan Nikiforov <ivan.nikiforov@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2024-10-16 16:09:51 +02:00
Manjunath
e1563e0237
Add additional info to coordinates (#5149) 2024-10-16 14:10:52 +02:00
Ivan Nikiforov
36c555ea61
fix: too long string written to cpe git.commitMessage (#5147)
* fix too long CPE string written to git/commitMessage

* Add debug log

* Fix debug log

* Truncate long git commit message title

* Add tests for truncateString

* Fix test

* Fix tests

* Fix tests

---------

Co-authored-by: Ivan Nikiforov <ivan.nikiforov@sap.com>
2024-10-16 13:45:23 +02:00
Srinikitha Kondreddy
bd8b08b93e
fix: add missing return value for error (#5146) 2024-10-15 14:29:09 +02:00
Anil Keshav
bc8225cffb
feat(build): add buildSettingsInfo for gradleExecuteBuild (#5043)
* creating build settings info from gradle build

* fix linting issue and typo

* fixing step description

* Apply suggestions from code review

Co-authored-by: Tilo Körner <70266685+tiloKo@users.noreply.github.com>

* Address code review comments

* Fix tests

* Fix tests

* Fix tests

* Fix test

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Tilo Körner <70266685+tiloKo@users.noreply.github.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2024-10-15 12:14:23 +05:00
Googlom
af05acad58
feat(events): Publish events to GCP PubSub by each step (#5122)
* test

* test

* draft

* generator

* some polishing

* go mod tidy

* fix unit

* fix unit

* fix unit

* fix unit

* fix unit

* resolve review comments

* resolve review comments

* add debug message on successful publish

* refactor to use global vault client

* cleanup

* rename

* clenup

* refactor

* remove token revocation

* handle nil vaultClient and add comments

* feat(events): Publish events (generated part) (#5131)

* add generated

* add generated

* refactor vaultClient usage

* fix unit tests

* fix unit tests

* fix
2024-10-11 14:55:39 +05:00
Simon Dold
8f0948d727
[ABAP] Change pipeline defaults (#5144) 2024-10-11 11:03:32 +02:00
Manjunath
430bb9b719
Simply mvn build command (#5143) 2024-10-10 14:30:48 +02:00
Simon Dold
3225a7ddc0
Adding log download as zip archive (#5121)
* adding LogOutput to clone step

* delete comments

* adding stepName

* change step name

* adding multiple log archive outputs files

* changing file name

* change filename

* change time format

* adding second file for testing

* adding second file

* change structure for PersistReportsAndLinks

* change to pointer

* change pointer

* cleanup

* changing file name

* adding logArchive for pull action

* adding logArchive for checkoutBranch

* refactor zip archive log

* change structure

* adding PersistArchiveLogsForPiperStep function

* adding persist structure to checkout

* adding FileNameStep

* adding unit tests

* correct name

* change whitespace in yaml

* fixing unit tests

* fixing createTag unit test

* fixing unit test

* fixing unit test

* rename ArchiveOutputLogs to LogOutputManager

* refactor pointer structure

* adopt tests to pointer structure

* fixing / error in repo name

* adding log overview also after archive log

* change log output structure

* adding always execution log

* update unit tests

---------

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2024-10-10 13:42:09 +02:00
Manjunath
b9050b53a5
Handle options properly (#5142) 2024-10-09 12:13:43 +02:00
Srinikitha Kondreddy
129e20d713
feat: add validation for application name (#5123)
* feat: add validation for application name

* improve error message

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2024-10-09 11:34:54 +02:00
Manjunath
41536720c1
Flatten the simple bom (#5141) 2024-10-09 10:17:39 +02:00
Manjunath
20b7eff911
Run makeBOM after aggregateBOM (#5140)
* Run makeBOM after aggregateBOM

* Fix tests
2024-10-08 12:58:48 +02:00
Sarat Krishnan
033a429c49
Fix gcts deploy field anonymize (#5129)
* adding anonymisation for object field

* Further fixes to gcts deploy step

* syntax changes
2024-10-08 10:15:58 +02:00
Manjunath
c991c5b16d
Fix maven build failures due to makeBom goal (#5134) 2024-10-08 09:56:32 +02:00
Rinita Asani
f6231de55b
gctsExecuteABAPQualityCheck type mismatch (#5132)
* Adapting unit test to run for packages with namespace

* Correct type mismatch for object count
2024-10-07 16:08:27 +02:00
Vyacheslav Starostin
60cbddbd47
npm config doesn't fail when workspaces enabled (#5120)
* Add -ws=false -iwr to npm config get registry

* Add -ws=false -iwr to npm config set registry

* Fix test

* Fix test

---------

Co-authored-by: Manjunath <manjunath.mandya.surendrakumar@sap.com>
2024-10-07 11:55:20 +05:00
Oliver Nocon
ef25e31acb
fix(vault): properly consider vault parameters & flags (#5118) 2024-10-04 09:33:53 +02:00