1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
Commit Graph

1200 Commits

Author SHA1 Message Date
larsbrueckner
a946034f74
toolrecord/whitesource: improve URL generation (#4581)
toolrecord file:
- drop the hardcoded default url
- use the more user-friendly project ID instead of the project token
2023-09-20 20:43:41 +05:30
Googlom
3744787348
chore(refactor): Switch GitHub actions provider to use github sdk (#4563)
* refactor github package and use builder pattern for client

* switch to github package

* some renamings

* fix panic on uninitialized provider

* fix according to review comments

---------

Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-09-20 09:38:45 +00:00
Dmitrii Pavlukhin
1e993263e6
removed enforcement (#4576)
Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2023-09-19 12:20:55 +03:00
Dmitrii Pavlukhin
971d5d1461
Making detect8 default script (#4568)
* made detect8 default

* amended tests to reflect detect 8

* amended

* amend

* amend

* amend tests

* 1

* 1

* tests-with-temp-changes-for-transition

* removed auto unmapping for detect7

* added-old-parameters-as-deprecated
2023-09-18 16:33:09 +03:00
Dmitrii Pavlukhin
b3dc339058
Removed quotation for several detect8 parameters to fix double quotation issue (#4565)
* removed quotation for detect8

* changed order of args

* chagned order
2023-09-14 10:07:53 +03:00
Egor Balakin
3eb4f165b2
feat(commonPipelineEnvironment): encrypt CPE (#4504)
* encrypt CPE - init

* fix

* disable encrypt on Jenkins

* get PIPER_pipelineEnv_SECRET from vault

* reuse artifactPrepareVersionOptions

* encrypt only with orchestrator.GitHubActions

* Workaround: orchestrators expect json

* add encryptedCPE flag

* remove JSON workaround

* throw error if stepConfigPassword is empty

* fix log messages

---------

Co-authored-by: Egor Balakin <egor.balakin@sap.com>
2023-09-11 12:58:57 +04:00
Marcus Holl
e80adc5ab9
helmExecute: opt out from template parsing (#4511)
Add option to opt out from helm template parsing

Co-authored-by: Linda Siebert <linda.siebert@sap.com>
Co-authored-by: Alexander Link <33052602+alxsap@users.noreply.github.com>
2023-09-08 10:30:30 +02:00
Linda Siebert
b58bb87114
Set chartPath to general for kubernetesDeploy (#4537) 2023-09-07 11:36:59 +02:00
renovate[bot]
67bcada96a
fix(deps): update module github.com/hashicorp/vault to v1.14.0 [security] (#4427)
* fix(deps): update module github.com/hashicorp/vault to v1.13.5 [security]

* fix(deps): update module github.com/Azure/azure-sdk-for-go/tree/sdk/storage/azblob to v0.4.1

* fix(deps): update module github.com/hashicorp/vault/sdk to v0.9.2
fix(deps): update module oras.land/oras-go to v1.2.3

* fix(deps): update module github.com/hashicorp/vault/sdk to v0.9.2-0.20230530190758-08ee474850e0
fix(deps): update module github.com/hashicorp/vault/sdk to v0.9.2-0.20230530190758-08ee474850e0

* replacing deprecated function

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-09-06 13:12:51 +05:00
michaelkubiaczyk
bc8d5efe46
Cxone release supporting applications (#4548)
* 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

* fix:formatting

* fix(checkmarxOne):yamllint too many blank lines

* fix(checkmarxOne):unit test

* fix(checkmarxOne):generated code

---------

Co-authored-by: thtri <trinhthanhhai@gmail.com>
Co-authored-by: Thanh-Hai Trinh <thanh.hai.trinh@sap.com>
2023-09-05 21:49:27 +02:00
Dmitrii Pavlukhin
0f04b5f6e1
added detect8 support (#4545) 2023-09-01 15:25:37 +03:00
sumeet patil
f6e6d04408
feat(fortifyExecuteScan): Fortify proxy parameter (#4543) 2023-08-31 17:18:18 +05:30
Christopher Fenner
8507ca2c17
feat(logging): print out commit sha of code used to build the binary (#4541)
* feat(logging): print out commit sha of code used to build the binary

* Update piper.go
2023-08-30 17:28:03 +02:00
Jk1484
e54d603898
chore(deps): update golang version to 1.19 (#4533)
Co-authored-by: I557621 <jordi.van.liempt@sap.com>
2023-08-23 16:29:02 +02:00
Egor Balakin
143c5b0bc3
fix(githubPublishRelease): ListByRepo - enable pagination (#4509)
* fix githubPublishRelease

---------

Co-authored-by: Egor Balakin <egor.balakin@sap.com>
2023-08-22 09:45:54 +02:00
Marcus Holl
d6d3b6b091
helmExecute triggered by buildExecute (#4521) 2023-08-21 11:10:00 +02:00
Andrei Kireev
e87b514b00
Fix issue with failing pipelines because of ignored alerts (#4518)
* Temporary commented adition of ignored alerts to the all alerts

* Removed adding from other places
2023-08-16 13:57:46 +02:00
Jordi van Liempt
0ba4c2206c
chore(deps): Replace io/ioutil package (#4494)
* update all deprecated ioutil usages

* forgotten changes

* add missing imports

* undo changing comment

* add missing 'os' import

* fix integration test

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-08-16 12:57:04 +02:00
Andrei Kireev
69347fe2af
feat(whitesourceExecuteStep) Unified audit format of vulnerabilities in SARIF file for whitesource (#4465)
* Unified audit state for whitesource step

* reverted unrelated to pr changes

* go fmt

* Fixed tests and formating

* fixed format issue in whitesource/reporting.go

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-08-15 08:26:57 +02:00
Jordi van Liempt
d01c161822
fix(golangBuild): BOM creation failed with private Go modules (#4460)
* quickly try to only specify base private repo URLs with git config

* fix the test

* refactoring of private modules

* test

* fix test

* fix url

* typo

* Adding gitConfiguration

* typo

* unit test

* unit test

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: aibaend1 <106729492+aibaend1@users.noreply.github.com>
Co-authored-by: asadu <aibyn_sadu@epam.com>
2023-08-14 10:03:43 +02:00
Egor Balakin
9189ab37b5
remove STAGES scope from kanikoExecute.multipleImages param (#4508)
Co-authored-by: Egor Balakin <egor.balakin@sap.com>
2023-08-11 13:31:53 +04:00
Googlom
8c863e457f
sapCumulusUpload step deactivation if its the only active step in stage (#4476)
* implement deactivation logic

* add step condition field

* add unit test and fix evaluateConditions

* add unit test for v1 and fix evaluateConditionsV1

* rollback old evaluator

* rollback v1 evaluator

* move into notActiveCondition and fix unit tests

* add a comment about sapCumulusUpload step

* optimize evaluateConditionsV1 parameters and map memory allocation

* refactor unit tests and add more test cases

* evaluateConditionsV1 refactored

---------

Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-08-10 16:11:33 +05:00
Ralf Pannemans
97edad076a
feat(cnbbuild): add build summary (#4506)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2023-08-09 09:18:48 +02:00
Ralf Pannemans
086232d201
chore(cnbbuild): Bump PLATFORM_API to 0.11 (#4507)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2023-08-08 14:52:51 +02:00
Egor Balakin
e2bf31872b
kanikoExecute: add multiple build (#4461)
* kanikoExecute: add MultipleImages option

---------

Co-authored-by: Egor Balakin <egor.balakin@sap.com>
2023-08-07 16:58:59 +04:00
Johannes Dillmann
b474eb2de7
Refactor buildpacks telemetry (#4467) 2023-08-04 13:31:33 +02:00
Jordi van Liempt
8bc827d494
feat(kaniko): Add optional verbose logging for kaniko command (#4499)
* add optional verbose logging for kaniko command

* change order of conditional arg appending

* change kaniko verbosity from trace to debug

* change kaniko verbosity from trace to debug

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
2023-08-04 08:53:24 +02:00
aibaend1
a247dc2694
adding verbose log of cyclonedx (#4492)
* adding log of cyclonedx

* fix test

* fix integration test

* fix assertion of test

---------

Co-authored-by: asadu <aibyn_sadu@epam.com>
2023-08-02 13:47:06 +06:00
sumeet patil
08d22a62e2
fix(checkmarxOne): added missing report (#4482)
* fix(checkmarxOne): added missing report

* added missing files after go generate
2023-07-27 09:35:54 +02:00
Daria Kuznetsova
84dead704b
added querySuite to codeql audit report (#4485) 2023-07-25 15:50:26 +03:00
thtri
c339f32d97
fix(checkmarxOne): changed json report (#4478)
* fix(checkmarxOne): changed json report
2023-07-21 10:16:25 +05:30
tiloKo
f9f1b59894
Abap environment build tag support (#4479)
* Hand over Tag to bf

---------

Co-authored-by: rosemarieB <45030247+rosemarieB@users.noreply.github.com>
2023-07-20 15:57:57 +02:00
Daria Kuznetsova
e117067a66
fix(codeqlExecuteScan): changed audit report format (#4474)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-07-19 19:16:05 +05:30
Akramdzhon Azamov
b703995917
feat(detectExecuteScan): deprecating parameter scanOnChanges (#4473)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-07-19 15:25:17 +05:30
Daniel Mieg
994e87479d
ABAP: Add details for EOF errors (#4442)
* Add details for EOF errors

* Add testcase

* remove test

* Add unit test
2023-07-18 09:05:53 +02:00
Vyacheslav Starostin
3d63ce235c
Add the possibility to push data to Splunk Prod (#4459)
* Add Splunk Prod

* Update test data

* Update naming

* Unit-test: update naming

* Fix

* Fix typo

* Fix test

* go generate
2023-07-14 19:19:57 +06:00
Ashly Mathew
9a0b84a953
Pin version of golang BOM to 1.4.0 (#4462) 2023-07-12 17:49:11 +02:00
Daria Kuznetsova
96f5508c8a
fix(codeqlExecuteScan): moved flag checkIfCompliance (#4443)
* moved checkForCompliance flag, updated description of sarif check params

* added generated codeqlExecuteScan

* moved appending reports before checking for compliance

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-07-11 22:02:54 +05:30
Pavel Busko
610e212306
feat(cnbBuild) Add support for pre and post-buildpacks (#4448)
* Add pre and post buildpacks

Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* fix integration tests

Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

* simplify if clauses

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

---------

Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-07-06 11:34:05 +02:00
Pavel Busko
13f1e94ade
fix(cnbBuild): read dockerConfigJSON from CPE and merge it with user-provided (#4444)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-07-04 14:19:02 +02:00
Pavel Busko
1befaa80a2
fix(cnbBuild): correctly construct docker config using credentials (#4441)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-07-03 08:55:06 +00:00
Pavel Busko
d8dacda121
feat(cnbBuild): support setting registry username and password via parameters (#4426)
* feat(cnbBuild): support setting registry username and password via parameters

* fix gitops integration test assertion

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* Update integration/integration_gitops_test.go

---------

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-06-30 12:02:35 +00:00
Jk1484
30d82e920d
fix(kaniko): Update documentation (#4405)
* replacing mandatory if to mandatory.

* Revert "replacing mandatory if to mandatory."

This reverts commit f98ab5f0ff.

* Update documentation

* go generate

* Update documentation

* go generate

---------

Co-authored-by: Ashly Mathew <ashly.mathew@sap.com>
Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2023-06-29 14:11:34 +06:00
Jordi van Liempt
bc2cdd18b8
fix(url-logger): Enable access log generation for mavenBuild (#4421)
Co-authored-by: I557621 <jordi.van.liempt@sap.com>
2023-06-28 09:27:08 +02:00
Anil Keshav
a9bab48557
feat (url-logger) Implement logic for a selection classifier (#4411)
* forcing the urls finder to relaxed

* adding a classifier map

* passing the stepName to the kaniko command executor bundle

* pass stepName to maven utils for mavenBuild

* improve enabling of Maven access log generation

* Revert "improve enabling of Maven access log generation"

This reverts commit 80b77223cd.

* Revert "pass stepName to maven utils for mavenBuild"

This reverts commit a4f99ae160.

* use reflection to update command stepName for mavenBuild

* Revert "use reflection to update command stepName for mavenBuild"

This reverts commit ef85c78669.

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-06-26 08:47:11 +02:00
Andrei Kireev
ae4550d0dd
fix(detectExecuteScan) Fixed problem with duplication of maven command (#4412)
* Fixed problem with duplication of maven command

* go fmt
2023-06-23 14:24:03 +02:00
Dmitrii Pavlukhin
f81b473723
fix(detectExecuteScan): Fix license incorrect fail with FailOn parameter (#4415)
Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2023-06-21 11:48:00 +05:30
Daria Kuznetsova
6eb4c2e72d
fix(codeqlExecuteScan): added waiting for the SARIF file upload (#4409)
* added waiting for the sarif file uploaded & tests

* increased polling time, added timeout for waiting response from server & tests

* fixed handling error while waiting sarif uploaded

* added params for checking sarif uploaded & refactor

* added test logs

* fixed logs and test

* added returning missed error

* changed params descriptions and server response error processing processing

* fixed retrying logic

* increased polling timeout params & refactored
2023-06-20 15:50:28 +03:00
Marcus Holl
8b36ae70e7
Adjust npmExecuteLint (output-format, print output to console) (#4407)
* Adjust npmExecuteLint (output-format, print output to console)

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
2023-06-19 12:04:37 +02:00
Marcus Holl
799853e791
[refactor] avoid code duplication when invoking eslint (#4401) 2023-06-15 12:27:38 +02:00