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

21 Commits

Author SHA1 Message Date
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
Anil Keshav
39d52a2123
feat (protecodeExecuteScan) enhancing protecode step with registry credentials (#4378)
* enhancing protecode with registry credentials

* Use protecodeUtils instead of separate package

* Add target path for docker config to be created

* Fix tests

* Fix build flags

---------

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2023-06-14 09:11:33 +02:00
Jk1484
ffc931aad1
feat(golangBuild): use 'unit' build tag to include tests during test execution (#4345)
* Added unit tag as argument. Added description to runTests command. Changed code generator to have unit build tag in generated unit test files.

* Added unit build tag to all unit test files.

* added to new unit test unit build tag

* Update verify-go.yml

* small fix

---------

Co-authored-by: Muhammadali Nazarov <Muhammadali.Nazarov@acronis.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2023-05-03 21:02:11 +05:00
ffeldmann
4ae97a8a73
(fix) change in protecode for cvss from float to string (#4167)
* fixes change in protecode for cvss from float to string

* Fixes protecode json files with new string format for cvss

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2022-12-19 18:49:59 +01:00
Oliver Nocon
f6a6448631
chore: fix linting issues (#3878)
* chore: fix linting issues

* add more fixes

* correct formatting

* Delete depl.yaml
2022-07-21 09:04:21 +02:00
Eng Zer Jun
0f4e30e9db
test: use T.TempDir to create temporary test directory (#3721)
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-07-12 15:19:12 +02:00
Pavel Busko
1f750af16d
feat(cnbBuild): cache buildpacks during multi-image build (#3635)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2022-03-30 13:58:16 +02:00
Christian Volk
22f6aa156f
feat(docker): use crane for pulling docker images (#3652) 2022-03-23 10:02:00 +01:00
Umidjon Urunov
3d341b4b24
protecodeExecuteScan -> adding replace binary option (#2778)
* protecodeExecuteScan -> [draft-1] adding replace binary option

* protecodeExecuteScan -> replace binary option extension

* protecodeExecuteStep :: fixing generete & format checks

* protecodeExecuteStep :: fixing TestUploadScanFileSuccess & clean up debug printings

* Update protecodeExecuteScan_test.go

* protecodeExecuteScan :: removing duplicate test cases

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-09-13 11:13:48 +02:00
Oliver Nocon
188e409a87
feat(protecodeExecuteScan): allow scanning a binary (#2889)
* feat(protecodeExecuteScan): allow scanning a binary

so far the step only accepts a Docker image or a FetchURL
This adds functionality to also pass a FilePath

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Fix fmt

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Sven Merk <s.merk@sap.com>
2021-06-17 09:40:21 +02:00
Christopher Fenner
367ca6211a
refactor(protecode): simplify protecode calls (#2838)
* simplify protecode calls

* add todos

* reomve todo

* restore go.sum

* Update cmd/protecodeExecuteScan.go

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>

* Apply suggestions from code review

* remove productID

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-06-15 22:29:24 +02:00
Christopher Fenner
aaa1869ec0
feat(protecode): rename artifactVersion to version (#2813)
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-05-05 19:52:13 +02:00
Christopher Fenner
4603bf3c0e
refactor(protecode): rename parameter reuseExisting (#2809)
* rename parameter

* update code

* correct tests
2021-05-04 15:03:43 +02:00
Christopher Fenner
f999925788
fix(influx): correct data type of influx measurements (#2171)
* update data type of influx measurements

* Update checkmarx.yaml

* pick changes from #1885 for testing

* update generated code

* update to new datatype

* adjust to type changes

* change back to string type

* Update fortifyExecuteScan.go

* add typo to be backward compatible

* change type to int for files_scanned and lines_of_code_scanned

* add typo

* add measurements to whitesource

* update generated sources

* adjust test cases

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-10 16:00:53 +01:00
Jesse Awan
ea203a2c69
fix(protecode): handle sha256 in upload artifacts (#2532)
* add sha256 check to protecodeExecuteScan

* remove trailing spaces

* add Unit-Test for getTarName

* Apply suggestions from code review

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-01-26 09:59:10 +01:00
Christopher Fenner
f7d881d602
fix(protecode): correct project naming (#1975)
* fix project naming

* add test case for getTarName

* correct tar filename generation

* handle empty version
2020-09-02 15:00:55 +02:00
Christopher Fenner
b59bac7892
fix(protecode): respect failOnSevereVulnerabilities parameter (#1969)
* fix redundant type issues

* cleanup

* extract report function for protecode package

* use speaking status constant for API results

* remove unconsidered return value

* correct switch statement

* handle severe vulnerabilities

* Apply suggestions from code review

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* correct test name

* return errors from WriteReport function

* expose ReportData struct

* set Error Category

* refactor constant visibility

* change type name

* describe type

* change type name

* fail after report generation

* do not fail on report write errors

* add error as return value

* fix typo

* use require statements

* assert major vulnerabilities

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-09-02 10:41:12 +02:00
Stephan Aßmus
a44fa4ccda
Make protecodeExecuteScan tests run in temp dir (#1966)
Fixes left-over files in cmd/
2020-08-31 08:45:00 +02:00
Christopher Fenner
173b453d84
refactor(protecode): add explicit parameter for Docker config.json file (#1914)
* add dedicated property to handle docker config file

* switch to dockerConfigJSON in groovy

* use DockerConfigJSON

* add secret reference

* Update protecode.yaml

* Update protecode.yaml

* improve docs

* update generated sources
2020-08-12 14:57:11 +02:00
Christopher Fenner
9340729646
chore(protecode): be more verbose about docker credentials (#1911)
* log more information about docker credentials

* remove println

* fix format issues

* Update protecodeExecuteScan.go

* correct weird space characters

* add test case for correctDockerConfigEnvVar
2020-08-11 14:42:08 +02:00
redehnroV
2ebf2010b7
Protecode as GoLang (#1119)
* Protecode as go implementation

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-02-06 16:16:34 +01:00