1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
Commit Graph

1264 Commits

Author SHA1 Message Date
Pavel Busko
bdc49e7be6
fix(detectExecuteScan): do not read imageNameTags from CPE directly (#4833)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2024-02-19 14:01:41 +01:00
Ralf Pannemans
49b8080461
feat(detectExecuteScan): Also scan images that are in the CPE (#4678)
feat(detectExecuteScan): Also scan images that are in the cpe

Signed-off-by: Ralf Pannemans <ralf.pannemans@sap.com>
Signed-off-by: Johannes Dillmann <j.dillmann@sap.com>
Signed-off-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2024-02-12 08:56:40 +01:00
Vyacheslav Starostin
4e3fa38dd3
Clean-up checkIfStepActive (#4814)
* Clean-up checkIfStepActive

* Mark --useV1 deprecated

* Clean up tests

* Update test

* Add warning message

* Update warning msg
2024-02-08 15:43:26 +06:00
Googlom
b4863fee45
fix(gitopsUpdateDeployment): take into account branch name when clonning (#4811)
* use branch when clonning a repo

* fix unit test mocks
2024-02-06 13:33:30 +05:00
Daria Kuznetsova
668b3711a3
fix(codeqlExecuteScan): improved logging (#4817) 2024-02-05 15:54:49 +05:30
Daria Kuznetsova
1520777d5d
fix(codeqlExecuteScan): set default value for ram to 4000 (#4803)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-02-05 10:55:55 +05:30
Philipp Stehle
28fa2608dd
cnbBuild: allow expansion of buildEnvVars (#4802)
* cnbBuild: allow expansion of `buildEnvVars`

* Update resources/metadata/cnbBuild.yaml

Co-authored-by: Ralf Pannemans <ralf.pannemans@googlemail.com>

---------

Co-authored-by: Ralf Pannemans <ralf.pannemans@googlemail.com>
2024-02-01 13:53:13 +01:00
Akramdzhon Azamov
689c79e388
Fixed issue with empty project tokens after scanning (#4808)
* Fixed issue with empty project tokens after scanning
2024-01-29 16:15:32 +01:00
Oliver Nocon
cd2fb914fa
feat: allow linting failures (#4355)
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2024-01-25 11:44:24 +01:00
Daria Kuznetsova
4be7b99f95
fix(codeqlExecuteScan): check for compliance for Audit All (#4796)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-01-25 11:05:29 +05:30
ffeldmann
d0e205d018
chore: Disables webanalytics telemetry reporting by default (#4788)
* Disables telemetry reporting by default

* Update cmd/piper.go
2024-01-22 14:12:44 +01:00
Adrien LESUR
61564ea229
Run helm dependency before helm lint (#4777)
* Update helmExecute.go

* Update helmExecute_test.go

* Try fix format issue
2024-01-18 13:06:42 +06:00
Daria Kuznetsova
6920cad511
feat(codeqlExecuteScan): adding data to InfluxDB (#4780)
* added influxdb to params, added log for testing

* changed fields for codeql influx db

* added setting codeql findings to influx

* refactored

* fixed typo

* added tests
2024-01-17 11:38:16 +03:00
Dmitrii Pavlukhin
808b21fa79
Add maven native-like build workaround for detect (#4712)
* added-native-like-build

* pom-path-uncommented

* Run install only for maven

* Added log

* debug

* Print config params

* Added pipeline env

* Added parameter to specify path to pom.xml

* Returned condition

* Added logging of config in verbose mode

---------

Co-authored-by: Andrei Kireev <a-kireev1989@mail.ru>
Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2024-01-15 22:50:22 +01:00
Dmitrii Pavlukhin
86a59eb412
Mend fix for the config path calculation (#4766)
* fix-for-the-scan-path-in-custom-pipelines

* amended-scan-path-logic

* minor-changes

* returned-old-way-of handling-config

* returned-old-way

* removed-comments
2024-01-15 10:30:19 +03:00
Dmitrii Pavlukhin
89e1e01ae9
Temporary Fix docker images timeout issue (#4762)
* returned-the-old-way-of-handling-images

* introduced-additional-parameter

* amended-the-description

* amended-condition
2024-01-09 15:22:54 +03:00
Googlom
ac5cf17317
refactor(orchestrator): Use singleton in orchestrator package and rename methods (#4639)
* rename interface, types and methods.
some type changes and refactor

* update dependent methods and variables

* fix unit tests

* a bit more refactor and fix

* concurrent safe singleton

* return old Options struct

* refactor creating config provider and fix nil pointer derefernce

* fix unit test and linter errors

* introduce resetting config provider (for unit tests)

* fix annoying error message when config provider is not configured

---------

Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
2024-01-09 16:01:15 +05:00
Dmitrii Pavlukhin
32657c44d7
changed-save-name (#4759) 2024-01-08 15:53:15 +03:00
Dmitrii Pavlukhin
f5f72bcc7c
Remove useDetect7 option (#4717)
* removed-detect7-option

* linting-fix

* removed-comment
2024-01-08 13:21:44 +03:00
Dmitrii Pavlukhin
6cc6a4e80a
Feature - whitesourceExecuteScan - adding ability to scan multiple docker images (#4755)
* added-multiple-images-scan-logic

* amended-description

* added-reference-to-common-pipeline-env
2024-01-05 18:23:55 +03:00
Vyacheslav Starostin
0688a05847
fix(imagePushToRegistry): image tag shouldn't contain plus sign (#4756) 2024-01-05 16:41:30 +06:00
Daniel Mieg
dbc3d41b37
SAP_COM_0948 (#4715)
* SAP_COM_0948 clone, pull & checkout

* Fix log output

* Enable compatibility for old tests

* Fix tests

* Add tests for SAP_COM_0948

* Change message

* Add tags for test

* add retry for error code 501

---------

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2023-12-19 15:16:48 +01:00
Jordi van Liempt
0b585ed932
Revert "Fix sidecar conditionals (#4672)" (#4727)
This reverts commit cd8c93ea6c.
2023-12-18 16:01:33 +01:00
Ralf Pannemans
cd8c93ea6c
Fix sidecar conditionals (#4672)
* fix sidecar conditionals

Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>

* Fix unit tests

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

* Consider parameter used in conditions of sidecars

Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>

---------

Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2023-12-18 16:03:58 +04:00
Daria Kuznetsova
4f5ed26031
fix(codeqlExecuteScan): support http(s) urls for maven settings files (#4718) 2023-12-13 11:55:07 +03:00
michaelkubiaczyk
f39dec68a5
Cxone updated release (#4723)
* 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

---------

Co-authored-by: thtri <trinhthanhhai@gmail.com>
Co-authored-by: Thanh-Hai Trinh <thanh.hai.trinh@sap.com>
2023-12-12 20:24:03 +01:00
Vyacheslav Starostin
083826485c
imagePushToRegistry: update sourceImages and targetImages parameters (#4707)
* Add imageTag param

* Make imageTag mandatory if tagArtifactVersion is true && update logic

* Make sourceRegistryURL mandatory if localDockerImagePath is not set

* Make some param mandatoryIf

* Change format of sourceImages param

* Add source image tag

* Update sourceImages and targetImages params

* Delete unused function

* Clean up tests

* Update

* Update metadata file

* Update tests

* Fix test

* Fix tests
2023-12-12 15:05:03 +06:00
sumeet patil
a6dccf995d
fix(codeqlExecuteScan): Fix for GlobalSettingsFile url checks (#4708) 2023-12-05 13:43:29 +05:30
sumeet patil
e6a7432025
fix(codeqlExecuteScan): url checks for settings file (#4706) 2023-12-04 15:32:12 +05:30
Daria Kuznetsova
aab4de4597
feat(codeqlExecuteScan): added params projectSettingsFile and globalSettingsFile (#4702)
* added settings file params

* added checking build tool
2023-12-01 12:45:31 +03:00
Anil Keshav
8dc2a1bfb4
feat: Add imagePushToRegistry step (#4609)
* imagePushToRegistry new step

* adding copy and push functionality

* including only copy correctly

* groovy step for imagePushToRegistry

* create .docker folder

* imagePushToRegistry new step

* adding copy and push functionality

* including only copy correctly

* groovy step for imagePushToRegistry

* create .docker folder

* fix CopyImage

* test

* test

* Correct docker config path

* Update

* Update

* Update

* Update

* Update

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Test

* Comment some logic

* Test: move regexp logic

* Test

* Update

* Update

* Clean up

* Update

* Update

* Update interface

* Rename function

* imagePushToRegistry: small refactoring (#4688)

* imagePushToRegistry new step

* adding copy and push functionality

* including only copy correctly

* groovy step for imagePushToRegistry

* create .docker folder

* Correct docker config path

* Update

* Update

* Update

* Update

* Update

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Test

* Comment some logic

* Test: move regexp logic

* Test

* Update

* Update

* Clean up

* Update

* Update

---------

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>

* Update step yaml file

* Update interface

* Rename func

* Update tests

* Update interface, create mock methods, update tests

* Update mock

* Add md file

* Fix groovy doc, unit test, go unit test

* Update

* Add unit tests

* Support tagLatest param

* Fetch source creds from Vault

* Update yaml file

* Support multiple images

* Update test

* Support copy images in parallel

* Update yaml

* Clean up

* Return err if no creds provided

* Fix tests

* Add err msg

* Add debug log

* Do not use CPE for targetImages

* Support platform

* Delete Jenkins specific creds

* Update groovy: do not handle Jenkins creds

* Delete unused code

* Fix: Support platform

* Fix: Support platform

* Apply suggestion from code review

Co-authored-by: Egor Balakin <14162703+m1ron0xFF@users.noreply.github.com>

* Apply suggestion from code review

Co-authored-by: Egor Balakin <14162703+m1ron0xFF@users.noreply.github.com>

* Add tests for parseDockerImageName

* Add comment that tagArtifactVersion is not supported yet

* Set limit of running goroutines

* Fix: Set limit of running goroutines

* The tagArtifactVersion is not supported yet

---------

Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
Co-authored-by: Egor Balakin <egor.balakin@sap.com>
Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
Co-authored-by: Egor Balakin <14162703+m1ron0xFF@users.noreply.github.com>
2023-11-30 15:06:31 +06:00
Silvestre Zabala
2738a91057
Fix logic of fetching golang private packages for `detectExecute step (#4695)
In #4595 a typo was committed that prevents Go private packages from
being correctly set up in the `detectExecute` step

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-11-29 10:23:38 +01:00
Daniel Mieg
0a738e882c
[ABAP] Refactor steps to allow API migration (#4687)
* Initial API Manager

* Intermediate part

* Intermediate step

* Fix utils tests

* Adapt pull

* Migrate Checkout

* Refactor createTags

* Refactoring

* Setup tests for SAP_COM_0510

* Add tests

* Refactor parsing

* Add retry to clone

* refactor

* Refactor and tests

* Fix function call

* Adapt create tag tests

* Adapt tests

* Add tests

* Fix tests

* Fix test

* Fix client mock

* Add unit test comments

* Add missing parameters

* Branch not mandatory for clone

* Improve switch branch trigger

---------

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2023-11-28 13:26:31 +01:00
Oliver Feldmann
17de9ed34c
Allow cALM service key for cTMS steps (#4661)
* Allow cALM service keys

* Fix typo

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>

* fix typo

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>

* Hardcode tms endpoint in calm test case

* Add new serviceKey parameter

* Use new serviceKey parameter

With deprecation warning if old tmsServiceKey parameter is used

* Add unit tests and optimise

* Remove tms from service key log message

* Apply suggestions from code review

Co-authored-by: Artem Bannikov <62880541+artembannikov@users.noreply.github.com>

* Remove unused json fields mapping

* Apply review suggestion

* Apply further review suggestions

* Use new parameter name in groovy

* Generate again

* Fix groovy test

---------

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
Co-authored-by: Artem Bannikov <62880541+artembannikov@users.noreply.github.com>
2023-11-27 14:28:18 +01:00
Pavel Busko
0baa6a6fcb
feat(cnbBuild): Use Paketo Jammy builder as default (#4694) 2023-11-23 13:37:19 +01:00
Googlom
0d6fb16034
add deprecation warning (#4691)
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-11-23 09:42:02 +01:00
Pavel Busko
9596f546c0
Bump CNB_PLATFORM_API to v0.12 (#4686)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2023-11-21 13:26:52 +01:00
Daria Kuznetsova
ca633186f9
refactor(codeqlExecuteScan): refactor codeql reporting (#4682)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-11-20 18:51:04 +05:30
Googlom
a838f485d7
add alias to serverUrl (#4670)
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-11-20 11:11:54 +01:00
Pavel Busko
63b7fd79bd
fix(cnbBuild): do not set supplementary groups for lifecycle (#4675)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2023-11-14 14:01:23 +01:00
tiloKo
2a98742f43
add semantic version, delete obsolete actual commit value (#4669) 2023-11-13 14:57:46 +01:00
Jk1484
f2b236c537
feat(npmExecuteScripts): added option to skip installing dev. deps. (#4660)
* feat(npmExecuteScripts): added option to skip installing dev. deps.

* added unit tests

* setting of OpenFile function for local testing

---------

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-11-10 11:04:00 +01:00
Anil Keshav
ef9b3d0dc9
feat (mavenBuild) allow flags to be modified during maven deploy (#4638)
* allow flags to be modified during maven deploy

* fix unit test

* fix unit test 2
2023-11-08 00:25:16 +01:00
Manjunath
ae7bfa5d92
Include createBOM flag in MTA build (#4629)
* Include createBOM flag in MTA build

* Uncomment bom creation

* Changed sbom path

* Changed source path

* Reverted source path and included folder path to bom

* Test docker image

* Test docker image

* sbom name change

* Removed the redundent log
2023-11-07 09:16:10 +01:00
Vyacheslav Starostin
59c2f75ce1
Splunk: Initialize Splunk client if dsn or prodCriblEndpoint provided (#4653)
* Initialize Splunk client if dsn or prodCriblEndpoint provided

* Fix tests

* Apply suggestions from code review

* go generate

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2023-11-06 14:25:13 +06:00
Googlom
68d034992f
replace plus sign (#4656)
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-11-03 13:37:23 +05:00
Pavel Busko
26bfec19b3
feat(cnbBuild): support builders with different CNB user ids (#4625)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-11-02 16:03:11 +01:00
Srinikitha Kondreddy
5dea6237f2
Add warning message when cf native builds uses bg deployment (#4646)
* Add warning message when cf native builds uses bg deployment

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2023-10-30 12:40:01 +01:00
Daria Kuznetsova
6331d1b839
feat(codeqlExecuteScan): cloning project from non-github scm to github #4630
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-10-18 16:50:15 +05:30
Andrei Kireev
49f4c81344
Add new unified fields to Mend and Blackduck SARIF (#4611)
* Add new unified fields to Mend and Blackduck SARIF

* fmt project

---------

Co-authored-by: Dmitrii Pavlukhin <dmitrii.pavlukhin@sap.com>
2023-10-17 11:48:52 +02:00