1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-05 13:25:19 +02:00

1383 Commits

Author SHA1 Message Date
Dmitrii Pavlukhin
8e962a7729
DetectExecuteScan enhance logging && Adding new parameter (includeDevDependencies) for WS step (#4958)
* Enhanced logging of build params for detectExecuteScan

* amended-parameter-description

* added-parameter-for-npm-dev-deps-inclusion

* amended-tests

* new-generated-file

* added-parameter-explicitly
2024-07-08 15:33:42 +03:00
Vyacheslav Starostin
b6b366066f
Disable telemetry reporting (#4983) 2024-07-05 17:23:57 +05:00
Vijayan T
0f427c324a
Fixed excluded directories with pattern (#4980)
Signed-off-by: Vijayan T <vijayanjay@gmail.com>
2024-07-05 16:36:25 +05:30
Marco Rosa
64aabd8daa
fix(credentialdiggerScan): get_discoveries and docker image (#4613)
* Improve logs of credentialdiggerScan step

* 'Restore step'

* Use dockerhub image for Credential Digger

* Regenerate credentialdiggerScan

* Update docker image tag

* Fix report generation with exportAll

* Update docker image for credentialdiggerScan

* Regenerate credentialdiggerScan step with new docker image

* Dont duplicate step name with log.Entry()

* Refactor RepoURL according to #4639

---------

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
Co-authored-by: Googlom <36107508+Googlom@users.noreply.github.com>
2024-07-04 14:59:53 +05:00
Srinikitha Kondreddy
4a4c13ff03
Cleanup outdated blue green support for cf native build tools (#4965)
* Remove blue green deployment support for cf native build tools

* Empty for testing

* Remove obsolete dependency

* feedback from code review

* Fix IT's run

* Add test
2024-07-04 12:13:36 +03:00
Akramdzhon Azamov
e2f1c13b75
Excluded directory '.pipeline' for detectExecuteScan step (#4955)
* Excluded directory './pipeline' for detectExecuteScan step

* fixed unit-tests

* changed config path from "pipeline/*" to ".pipeline/*"

* Refactor exclude handling

---------

Co-authored-by: Vijayan T <vijayanjay@gmail.com>
2024-07-01 18:48:53 +05:30
Simon Dold
65dbd4526c
Adapt clone step to work with customer-managed Repos (BYOG) (#4966)
* adding byog credentials for clone command

* adding unit tests for clone body

* adding parameters

* adding optional byog parameters

* fixing typo in username

* remove aliases in config yaml

* change yaml config

* logs

* change info log

* change logs

* remove logs

* adding log statements

* remove log statements

* fixing typo in test class

* change repoTest structure

* remove comment

* remove comment

* generate

* adding unit test comments

* adding error handling

* adding isByog check

* fixing unit test

* generate

* Update manageGitRepositoryUtils_test.go

* restructure isByog parameter

* adding empty line for md linter

* adding config.yaml example to docs

* Update documentation/docs/steps/abapEnvironmentCloneGitRepo.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* Update documentation/docs/steps/abapEnvironmentCloneGitRepo.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* Update documentation/docs/steps/abapEnvironmentCloneGitRepo.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* Update documentation/docs/steps/abapEnvironmentCloneGitRepo.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* Update documentation/docs/steps/abapEnvironmentCloneGitRepo.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* adding release

---------

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2024-06-25 08:09:31 +00:00
Tilo Körner
b9022dc10d
Publish TargetVector enhanced retry (#4971)
* cache Error, increase max polling duration

* Update abapAddonAssemblyKitPublishTargetVector_generated.go
2024-06-24 14:49:40 +02:00
Tilo Körner
bf9c743fb6
errorcause and remove telemetry warnings (#4951) 2024-06-20 10:44:12 +02:00
Dmitrii Pavlukhin
1b728ccd3e
Enabled the possibility to avoid aggregation of NPM projects in WhitesourceExecuteScan (#4956)
* Enabled the possibility to avoid aggregation of NPM projects

* renamed-function

---------

Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
2024-06-20 09:08:24 +03:00
KingJul1an
ab88749b2d
fix(docs): dead link in sonarExecuteScan (#4936)
* fix dead link in sonarExecuteScan.yaml

https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner leads to "Page not found"

* Update sonarExecuteScan.yaml

* Update sonarExecuteScan.yaml

typo

* Update sonarExecuteScan_generated.go

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2024-06-19 14:38:48 +02:00
Daria Kuznetsova
92a6705c2e
fix(codeqlExecuteScan): transforming querySuite to empty string (#4957)
* fixed transforming querySuite to empty string

* fixed error handling

---------

Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
Co-authored-by: Mihai Herda <77497647+mihai-herda-SAP@users.noreply.github.com>
2024-06-19 10:15:44 +02:00
Vijayan T
4827785a73
support for sub-module in maven build (#4950)
* support for sub-module in maven build

* fixed test-cases

Signed-off-by: Vijayan T <vijayanjay@gmail.com>

* fixed test-cases

Signed-off-by: Vijayan T <vijayanjay@gmail.com>

* changed the function name

---------

Signed-off-by: Vijayan T <vijayanjay@gmail.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
2024-06-19 12:52:03 +05:30
Daniel Mieg
8eeba2d005
[ABAP] Migrate SAP_COM_0510 to SAP_COM_0948 (#4925)
* Migrate SAP_COM_0510 to SAP_COM_0948

* Update error message

* Update error message

* Fix error message in unit test

* Update unit tests
2024-06-10 10:51:22 +02:00
Daria Kuznetsova
67ed27f07d
added sed cmd to transform querySuite (#4945)
* added sed cmd to transform querySuite

* changed sh to bash

* added checking os

* fixed tests by mocking utils

* fixed tests

* renamed param

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-06-06 15:14:03 +03:00
Andrei Kireev
e2a5b0928a
feat(detectExecuteScan) Added npm install step for detectExectueScan (#4949)
* Added npm install step for detectExectueScan
2024-06-06 09:20:08 +02:00
Christopher Fenner
0ca2f72699
chore(mockery): add mockery configuration (#4941)
* update mockery config

* update mockery config

* rename mockery config

* update existing mocks

* update mockery config

* update mockery config

* move cmd mocks to cmd pkg

* add hadolint mocks to config

* use moved files

* remove comment
2024-06-04 13:40:35 +02:00
thtri
683ca35001
CxOne: Add param to tag scan and project (#4944)
* 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

---------

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>
2024-06-03 10:01:50 +02:00
Dmitrii Pavlukhin
3e86491c18
detectExecuteScan - fix for diagnostics folder path (#4940) 2024-05-31 17:43:24 +03:00
Dmitrii Pavlukhin
c4019cf860
detectExecuteScan - added parameter for diagnostic mode (#4937)
* detectExecuteScan - added parameter for diagnostic mode

* changed-syntax

* added-custom-output-path

* amended-directory-creation
2024-05-28 17:52:14 +03:00
Jordi van Liempt
ce34dd3f3c
fix(gcpPublishEvent): Error handling in non-standard Vault cases (#4938)
* fix error handling in non-standard Vault cases

* handle case where Vault isn't configured and no error is thrown

* remove unnecessary return

---------

Co-authored-by: jliempt <>
2024-05-28 14:19:17 +02:00
Daria Kuznetsova
8924b9786e
feat(codeqlExecuteScan): added a feature to execute custom command (#4912)
* added running custom command

* go mod tidy

* added log with parsed command info

* fixed log format

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-05-27 16:39:05 +05:30
Dmitrii Pavlukhin
f7543be3b0
Implement MTA build for detectExecuteScan step (#4876)
* added-parameter

* added-platform-param-for-mta-build

* add-verbose-build-config-output

* set-install-artifacts-true

* comment-m2-defaults

* returned-m2-param

* synced-with-master

* fix-yaml

* fix-yaml2

* fix-yaml3

* fix-yaml3

* fix-yaml4

* returned-m2path-in-folder

---------

Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2024-05-24 12:01:45 +03:00
Ralf Pannemans
77758b3db0
feat(cnbBuild): Only use sbom-cataloger with cnb images (#4934) 2024-05-23 13:44:22 +02:00
Ralf Pannemans
a5061f3328
chore(deps): update syft version to 1.4.1 (#4933)
* Bump default syft version to 1.4.1

Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2024-05-23 13:32:11 +02:00
Jordi van Liempt
7de5fdfa8a
feat(gcpPublishEvent): Add additionalEventData param (#4928)
* add additionalEventData param

* fix double JSON marshalling

* go generate

* add logging of events and config

* change logging to debug

* add event log

* fix CloudEvent JSON type

* apply review feedback

* fix log

* add missing error handling

---------

Co-authored-by: jliempt <>
2024-05-17 08:24:31 +00:00
Vyacheslav Starostin
065fedbef4
sonarExecuteScan: update documentation (#4930)
* sonarExecuteScan: update documentation

* Jenkins only

* Jenkins only
2024-05-16 16:03:14 +05:00
Tilo Körner
ac55ddf525
support trustedCerts for cloneGitRepo (#4909)
* support trustedCerts for cloneGitRepo

* some more steps

* Update sap_com_0948.go

* remove warning for config value type

* updated description for certificateNames

* go generate artifacts

* variable order and space in "[]interface {}"
2024-05-10 08:58:46 +02:00
Jordi van Liempt
1f4010a97e
feat(events): Retrieve OIDC token in gcpPublishEvent (#4917)
Co-authored-by: jliempt <>
2024-05-07 15:43:07 +02:00
Jordi van Liempt
f5fbb7e9d9
feat(vault): Facilitate Vault OIDC token (#4916)
* add functionality to retrieve Vault OIDC token

* fix tests for now

* update error

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

* implement commented tests

* run mockery for config pkg

---------

Co-authored-by: jliempt <>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2024-05-07 12:19:39 +00:00
Christopher Fenner
0f83941765
feat(events): add step to emit events to GCP (#4901)
* feat(gcp): add step to send events to GCP (#4896)

* add gcp token handling

* add initial step

* publish events

* add test cases

* fix test case

---------

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>

* feat(gcp): Generate and validate the GCP OIDC token (#4899)

* test setup for generation of jwt token

* oidc token generator

* push new step files

* formatted code

* removed toolchain and jose

* removed toolchain:go 1.22.2

---------

Co-authored-by: jliempt <>
Co-authored-by: D071696 <sachin.baral.ramesh@sap.com>
Co-authored-by: d071696 <153099976+d071696@users.noreply.github.com>

* feat(events): add pipeline start and end event (#4900)

* add gcp token handling

* add initial step

* publish events

* add test cases

* fix test case

* move files

* add possible values

* handle start and end event

* add sap events

* dependencies

---------

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>

* log successful event publish

* remove dummy step

* prevent step from failing

* improve event creation

* improve event creation

* simplify eventing

* remove detailed events

* update parameter scope

* update go.sum

* fix test case

* add missing method

* refactor OIDC part

* add oidc.go to vault pkg

* mock OIDC token retrieval

* mock GCP functions

* update OIDC function name in Vault mocks

* get event data from CPE

* don't encode data payload in b64

* remove vault related changes

* remove vault changes from step code

* remove commented out code

* documentation/steps/gcpPublishEvent.md

* documentation/steps/gcpPublishEvent.md

* remove hardcoded eventData

* update roleID

* go generate

* add ordering key for pubsub event

---------

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
Co-authored-by: D071696 <sachin.baral.ramesh@sap.com>
Co-authored-by: d071696 <153099976+d071696@users.noreply.github.com>
Co-authored-by: jliempt <>
2024-05-06 09:28:28 +02:00
Akramdzhon Azamov
fb809a2b03
added detect9 (#4920) 2024-05-03 17:28:29 +03:00
tiloKo
0aac69625e
Provide addonDescriptor to build System (#4914) 2024-05-02 13:22:35 +02:00
Oliver Nocon
7d9fc6aee4
fix(versioning): ensure that version is not empty (#4173)
Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2024-04-29 08:19:52 +02:00
Andrei Kireev
b18f8578d0
fix(detectExecuteScan) Hide repositoryPassword from logs (#4908) 2024-04-26 09:43:23 +02:00
Andrei Kireev
af28a72ef9
fix(detectExecuteScan) Generate reports for project with no components (#4905)
* fix(detectExecuteScan) Generate reports for project with no components

* Resolved merge conflicts
2024-04-24 13:26:18 +02:00
michaelkubiaczyk
7a3024c697
fix(cxOne): fix SARIF duplicated entries and branch name (#4904)
* 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

---------

Co-authored-by: thtri <trinhthanhhai@gmail.com>
Co-authored-by: Thanh-Hai Trinh <thanh.hai.trinh@sap.com>
2024-04-22 18:21:02 +02:00
tiloKo
265105efa1
AAKaaS holistic pv check (#4893)
* new step abapAddonAssemblyKitCheck
2024-04-22 13:12:38 +02:00
Daria Kuznetsova
df0b288ecb
refactor codeqlExecuteScan (#4888)
* refactored codeql step

* fixed tests

* fixed reports output dir

* refactored

* fixed returning error

* fixed tests

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-04-16 11:35:56 +03:00
Dmitrii Pavlukhin
94a33844a0
detectExecuteScan - Removed option to change min-scan-interval for Signature Scan to enforce global interval value (#4875)
* removed option to change min-scan-interval to enforce global interval value

* returned-param-to-avoid-pipeline-breaks

* fix-for-tests
2024-04-15 16:12:13 +03:00
Vyacheslav Starostin
8241580163
Run artifactPrepareVersion inside a docker container for CAP apps (#4891)
* Run artifactPrepareVersion inside a docker container when build tool is CAP

* Run artifactPrepareVersion inside a docker container for CAP apps

* Run artifactPrepareVersion inside a docker container for CAP apps

* Update yaml
2024-04-12 13:55:59 +05:00
Vyacheslav Starostin
b0ecbf68ad
feat(artifactPrepareVersion): Introduce build tool CAP (#4890)
* feat(artifactPrepareVersion): Introduce build tool CAP

* feat(artifactPrepareVersion): Introduce build tool CAP

* Add CAPVersioningPreference to versioning.Options

* Include CAP to allowed build tool list

* Update go.mod

* Include CAP to allowed build tool list

* Delete CAP from additionalTargetTools

* Delete CAP from additionalTargetTools

* Fix test

* Update comment

* Update comment

* Add param description

* Add param description
2024-04-10 13:45:21 +05:00
Jordi van Liempt
38fe2ea84b
chore(sonar): Update Sonar default image to 5.0 (#4881)
* update Sonar default image

* go generate

---------

Co-authored-by: jliempt <>
2024-04-03 10:46:28 +02:00
Vijayan T
8627ad6ee4
Updated the description of installArtifacts in mend (#4877) 2024-04-02 11:15:30 +05:30
Daria Kuznetsova
bf59a28aba
feat(codeqlExecuteScan): added open configs for codeql database creation and analysis (#4869)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-04-02 10:18:17 +05:30
An Rav
a1184a7f98
Updated documentation for gctsdeploy step (#4856)
* updated text of scope parameter

* go generate all yaml files

---------

Co-authored-by: Sarat Krishnan <78093145+sarat-krk@users.noreply.github.com>
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2024-03-27 13:55:04 +01:00
Oliver Feldmann
f6a3bbe655
Fail on error also in case of no lint config present (#4658)
* Fail on error also in case of no lint config present

* Fix errors

* test: add unit test
2024-03-25 15:13:29 +01:00
Srinikitha Kondreddy
6e8fdb7979
Bug: fix typo (#4870)
Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2024-03-25 13:41:31 +00:00
Hilmar Falkenberg
2d3c666d3a
[docs] fix some typos and markdown issues on helm documentation (#4867)
* fixes `go build` on windows

cmd\cnbBuild.go:589:3: unknown field Credential in struct literal of
type "syscall".SysProcAttr
cmd\cnbBuild.go:589:24: undefined: syscall.Credential

* Update cnbBuildAttr.go

* Update cnbBuildAttr_windows.go

* go fmt

* fix some typos and markdown issues
2024-03-25 14:00:01 +01:00
Ralf Pannemans
70dac23c73
Revert "feat(cnbBuild): validate docker credentials (#4840)" (#4872)
Apparently this pr caused some regression.

This reverts commit df2e976eaab00e3dc71f2fec117d23a67a085742.
2024-03-25 10:43:23 +01:00