1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-07 13:42:23 +02:00

1299 Commits

Author SHA1 Message Date
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
Daria Kuznetsova
2d2d357599
feat(contrastExecuteScan): new step contrastExecuteScan (#4818) 2024-03-21 10:13:59 +05:30
Jordi van Liempt
8bf6298250
feat(imagePushToRegistry): Support imageNameTags (#4853)
* add imageNameTags related parameters to step

* fix registry+imageNameTags

* add debug logging

* remove debug logging

* update parameter docs

---------

Co-authored-by: jliempt <>
2024-03-18 13:46:35 +01:00
Johannes Dillmann
df2e976eaa
feat(cnbBuild): validate docker credentials (#4840) 2024-03-15 10:44:14 +01:00
Srinikitha Kondreddy
d54df69de4
Extend deprecation time for cf native blue green plugin (#4861)
* Extend deprecation time for cf native blue green plugin
2024-03-15 10:32:28 +01:00
Pavel Busko
4d86308433
chore(cnbBuild): simplify telemetry data (#4864)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2024-03-14 15:39:30 +01:00
tiloKo
1259a32de1
Enable logon to AAKaaS via Certificate (mTLS) (#4860)
* originHash

* analysis output

* first shot

* add cert logon to piper http client

* allow initial user/pw for certificate logon

* credentials -> parameters

* encode user cert in pem

* key as well

* fix unit tests after merge

* other aakaas steps

* 2nd conn in register packages
2024-03-12 14:27:00 +01:00
tiloKo
2c69c4c669
shorten commits to common length prior compare (#4859)
* shorten commits to common length prior compare

* remove obsolete unit tests

* some test

* 2nd try

* fix old wrong unit test
2024-03-08 10:46:30 +01:00
Hilmar Falkenberg
09cd271415
fixes go build on windows (#4858)
* fixes `go build` on windows
2024-03-07 13:37:49 +01:00
tiloKo
c0e56d26e0
AAKaaS originHash (#4843)
* originHash

* analysis output

* unit tests
2024-03-05 15:21:34 +01:00
Vijayan T
a675ed25e9
Removing contents after colon in multiple image/project scenario (#4855)
* Removing contents after colon in multiple image/project scenario

* removed unused pkgs
2024-03-05 16:45:18 +03:00
Michèle Wyss
c7fc38ca84
Doc: Add explanation of cvssSeverityLimit in whitesource (#4657)
* Add minor explanation of cvssSeverityLimit in whitesource

The cvssSeverityLimit parameter is helpful to ensure overall compliance. The documentation of the parameter's behavior is not sufficient to understand the implications of the default value and therefore I suggest this small addition.

* Update whitesourceExecuteScan_generated.go

---------

Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2024-03-04 13:37:02 +01:00
Vijayan T
04028a647c
whitesource image scan removing the timestamp and commit id (#4842)
* whitesource image scan removing the timestamp and commit id to keep static project name

* moving the logic within whitesource step
2024-02-26 15:08:13 +03:00
Anil Keshav
ebf8e7d08d
feat (pythonBuild) include pip install of requirements.txt before cyclone dx sbom generation (#4844)
* adding requirements file path param

* adding installation of requirements.txt via pip

* changing long description

* removing trailing spaces for long description

* running go generate
2024-02-26 08:58:40 +01:00
Vijayan T
06e81ea87d
Display workspace content for debugging (#4839)
* display workspace content for debugging

* adding verbose check

* renaming function
2024-02-22 12:21:13 +03:00
Johannes Dillmann
54426d1237
Support dashes in Helm values (#4841)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2024-02-21 12:47:27 +00:00
Ralf Pannemans
d0f99c3e99
feat(kubernetesDeploy): Better support for sub-charts (#4829) 2024-02-21 10:00:50 +01:00
ranliii
f1234114be
Abap environment update addon product (#4774)
* new Piper step abapEnvironmentUpdateAddOnProduct

* modified entity json format and some minor function changes

* modified groovy file for pipelineStageIntTests and addonDescriptor to be mandatory in yaml file

* sync with fork branch ranliii/abap-environment-update-addon-product

* added generated file

* fail the step as long as addon update not successful and unit tests

* added docu for the new step

* tried to fix groovy unit test

* tried to fix groovy unit test 2

* for test

* fixed error

* fixed error 2

* tried to fix groovy unit test error

* added groovy unit test for new Piper step

* tried to fix groovy unit test error

* tried to fix groovy unit test error 2

* changes after first review

* remove .DS_Store

* for test

* revert test relevant changes

* try to fix groovy test error

* try to fix groovy error

* 3rd try to fix groovy test error

* rewrite the failed groovy test

* small changes and try with timeout as well as poll interval

* changes for test

* revert test-related changes

* try to fix errors

* Revert "Merge branch 'master' into abap-environment-update-addon-product"

This reverts commit 1ee0bcd80dd8ec58102ece31cacbe08bfd669ba1, reversing
changes made to 3c4a99dfb027ad561f0a52e888acaffb7be0053f.

* try to fix error

* try to fix error 2

* try to fix error 3

* align go.mod with master branch

* revert go.mod to commit 3c4a99d

* for test

* revert test changes

* new unit test

* Revert "Revert "Merge branch 'master' into abap-environment-update-addon-product""

This reverts commit 363c0380011e148231273d3f180dcec4d5cba88f.

* go generate after merging master

---------

Co-authored-by: Jk1484 <35270240+Jk1484@users.noreply.github.com>
Co-authored-by: Ran Li <ran.li01@sap.com>
Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2024-02-20 19:39:43 +01:00
Pavel Busko
38fa25795a
fix(detectExecuteScan): sanitize container image name before saving (#4834)
* fix(detectExecuteScan): sanitize container image name before saving

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

* mock docker client during unit tests

Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>

---------

Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2024-02-20 12:56:37 +01:00
Vyacheslav Starostin
b644bf7e15
Use Pendo as analytics tool (#4828)
* Try pendo

* Try pendo

* Fix typo

* Optimize data struct

* Adjust kaniko and kubernetes to try pendo

* Include golangBuild

* Update generator helper

* go generate

* Delete token param from some steps && go generate

* Add checking on ExportPrefix

* Update telemetry struct

* Try pipelineID for artifactPrepVersion

* Try pipelineID as a CPE value

* Update

* Try CF

* Read pipelineID from CPE

* Enable telemetry

* Fix name

* Do not show token in header

* Read pipelineID from CPE

* Clean up

* Clean up

* Update template

* go generate

* Update template

* Try Cribl

* HTTPS

* Update

* Clean-up

* Fix tests

* Update
2024-02-20 17:17:20 +06:00
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