Skip to content

Commit

Permalink
Merge pull request #2849 from mercedes-benz/develop
Browse files Browse the repository at this point in the history
Merge `develop` into `master` for pds release
  • Loading branch information
sven-dmlr authored Jan 22, 2024
2 parents 243cea0 + 9ff7127 commit 6b3c27b
Show file tree
Hide file tree
Showing 25 changed files with 210 additions and 56 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/documentation-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
with:
go-version: 1.20.4

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c
with:
path: |
~/.cache/go-build
Expand All @@ -74,14 +74,14 @@ jobs:
# Upload documentation
# -----------------------------------------
- name: Archive documentation HTML
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-docs-html
path: sechub-doc/build/docs/final-html/
retention-days: 14

- name: Archive documentation PDF
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-docs-pdf
path: sechub-doc/build/docs/asciidoc/*.pdf
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/github-action-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ jobs:
build-scan:
runs-on: ubuntu-latest
# Let's set the scan action folder as the working directory for all "run" steps:
working-directory: ./github-actions/scan

defaults:
run:
working-directory: ./github-actions/scan
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand All @@ -27,4 +29,4 @@ jobs:
- name: Run tests
run: npm test



18 changes: 9 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
go-version: 1.20.4

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c
with:
path: |
~/.cache/go-build
Expand Down Expand Up @@ -72,60 +72,60 @@ jobs:
# -----------------------------------------
- name: Archive combined test report
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: combined-sechub-testreport
path: build/reports/combined-report
retention-days: 14

- name: Archive sechub server artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-server
path: sechub-server/build/libs
retention-days: 14

- name: Archive pds server artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-pds
path: sechub-pds/build/libs

- name: Archive pds tools artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-pds-tools
path: sechub-pds-tools/build/libs

- name: Archive developer tools artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-developertools
path: sechub-developertools/build/libs
retention-days: 14

- name: Archive sechub client artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-client
path: sechub-cli/build/go
retention-days: 14

- name: Archive sechub integration test report artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-integrationtest-test-reports
path: sechub-integrationtest/build/sechub-test-reports
retention-days: 14

- name: Archive openAPI3 JSON files
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-api-spec
path: sechub-doc/build/api-spec/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ jobs:
# -----------------------------------------
- name: Archive combined test report
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: combined-sechub-testreport
path: build/reports/combined-report
retention-days: 14
- name: Archive GIT status
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: git-status.txt
path: build/reports/git-status.txt
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release-client-server-pds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
go-version: 1.20.4

- name: Set up Go caching
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c
id: go-cache
with:
path: |
Expand Down Expand Up @@ -202,46 +202,46 @@ jobs:
# -----------------------------------------
- name: Archive combined test report
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: combined-sechub-testreport
path: build/reports/combined-report
retention-days: 14

- name: Archive GIT status
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: git-status.txt
path: build/reports/git-status.txt
retention-days: 14

- name: Archive sechub server artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-server
path: sechub-server/build/libs
retention-days: 14

- name: Archive pds server artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-pds
path: sechub-pds/build/libs

- name: Archive developer tools artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-developertools
path: sechub-developertools/build/libs
retention-days: 14

- name: Archive sechub client artifacts
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-client
path: sechub-cli/build/go
Expand All @@ -260,21 +260,21 @@ jobs:
# Upload documentation
# -----------------------------------------
- name: Archive documentation HTML
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-docs-html
path: sechub-doc/build/docs/final-html/
retention-days: 14

- name: Archive documentation PDF
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-docs-pdf
path: sechub-doc/build/docs/asciidoc/*.pdf
retention-days: 14

- name: Archive openAPI3 JSON files
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-api-spec
path: sechub-doc/build/api-spec/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-pds-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ jobs:
- name: Archive GIT status
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: git-status.txt
path: build/reports/git-status.txt
retention-days: 14

- name: Archive PDS-Tools cli artifact
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-pds-tools
path: sechub-pds-tools/build/libs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-wrapper-checkmarx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ jobs:
- name: Archive GIT status
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: git-status.txt
path: build/reports/git-status.txt
retention-days: 14

- name: Archive Checkmarx Wrapper libs directory
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-wrapper-checkmarx
path: sechub-wrapper-checkmarx/build/libs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-wrapper-owaspzap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ jobs:
- name: Archive GIT status
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: git-status.txt
path: build/reports/git-status.txt
retention-days: 14

- name: Archive OWASP-ZAP Wrapper libs directory
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-wrapper-owasp-zap
path: sechub-wrapper-owasp-zap/build/libs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-wrapper-xray.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ jobs:
- name: Archive GIT status
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: git-status.txt
path: build/reports/git-status.txt
retention-days: 14

- name: Archive Xray Wrapper libs directory
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: sechub-wrapper-xray
path: sechub-wrapper-xray/build/libs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.mercedesbenz.sechub.commons.model.ClientCertificateConfiguration;
import com.mercedesbenz.sechub.commons.model.ScanType;
import com.mercedesbenz.sechub.commons.model.SecHubConfigurationModel;
import com.mercedesbenz.sechub.commons.model.SecHubDataConfigurationUsageByName;
Expand Down Expand Up @@ -103,6 +104,9 @@ public SecHubFileStructureDataProvider build() {
SecHubWebScanConfiguration webScan = webScanOpt.get();
Optional<SecHubWebScanApiConfiguration> apiOpt = webScan.getApi();
addAllUsages(data, apiOpt, false);

Optional<ClientCertificateConfiguration> clientCertOpt = webScan.getClientCertificate();
addAllUsages(data, clientCertOpt, false);
break;
case ANALYTICS:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import com.mercedesbenz.sechub.commons.model.JSONConverter;
import com.mercedesbenz.sechub.commons.model.ScanType;
import com.mercedesbenz.sechub.commons.model.SecHubCodeScanConfiguration;
import com.mercedesbenz.sechub.commons.model.SecHubConfigurationModel;
Expand Down Expand Up @@ -233,4 +234,49 @@ void for_scantype_secretscan_and_source_data_section_create_data_provider() {
assertFalse(dataProvider.isRootFolderAccepted());
}

@Test
void for_scantype_webscan_sources_data_section_for_api_and_client_certificate_create_data_provider() {
/* prepare */
String json = """
{
"apiVersion" : "1.0",
"data" : {
"sources" : [ {
"name" : "open-api-file-reference",
"fileSystem" : {
"files" : [ "openApi.json" ]
}
},
{
"name" : "client-cert-api-file-reference",
"fileSystem" : {
"files" : [ "certificate.p12" ]
}
} ]
},
"webScan" : {
"url" : "https://localhost",
"api" : {
"type" : "openApi",
"use" : [ "open-api-file-reference" ]
},
"clientCertificate" : {
"password" : "secret-password",
"use" : [ "client-cert-api-file-reference" ]
}
}
}
""";
SecHubConfigurationModel model = JSONConverter.get().fromJSON(SecHubConfigurationModel.class, json);

/* execute */
SecHubFileStructureDataProvider dataProvider = builderToTest.setModel(model).setScanType(ScanType.WEB_SCAN).build();

/* test */
assertNotNull(dataProvider);
assertTrue(dataProvider.getUnmodifiableSetOfAcceptedReferenceNames().contains("open-api-file-reference"));
assertTrue(dataProvider.getUnmodifiableSetOfAcceptedReferenceNames().contains("client-cert-api-file-reference"));
assertFalse(dataProvider.isRootFolderAccepted());
}

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: MIT
[[section-tutorials]]
= SecHub Tutorials
== SecHub Tutorials

The SecHub tutorials are step by step user guides for different tasks. +
Examples show setups and use cases for different purposes. For detailed technical documentation please see the technical documentation. +

include::01_integrate_new_module.adoc[]
include::02_integrate_new_module.adoc[]

include::02_create_new_pds_solution.adoc[]
include::03_create_new_pds_solution.adoc[]
Loading

0 comments on commit 6b3c27b

Please sign in to comment.