diff --git a/.github/workflows/release-client-server-pds.yml b/.github/workflows/release-client-server-pds.yml index 597799531b..1a8ffe5646 100644 --- a/.github/workflows/release-client-server-pds.yml +++ b/.github/workflows/release-client-server-pds.yml @@ -66,6 +66,9 @@ jobs: echo "For PDS release, pds-milestone-number must be provided!" exit 1 + - name: Install required packages + run: sudo apt-get -y install build-essential dpkg-dev fakeroot graphviz hub + - name: Checkout master uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: @@ -248,9 +251,6 @@ jobs: path: sechub-cli/build/go retention-days: 14 - - name: Install graphviz (asciidoc diagrams) - run: sudo apt-get --assume-yes install graphviz - # ----------------------------------------- # Build Documentation # ----------------------------------------- @@ -495,64 +495,43 @@ jobs: # ****************************************** # C l i e n t release # ****************************************** - - name: Create client release ${{ inputs.client-version }} - id: create_client_release - if: inputs.client-version != '' - uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: v${{ inputs.client-version }}-client - commitish: master - release_name: Client Version ${{ inputs.client-version }} - body: | - Changes in this Release - - Some minor changes on client implementation - - For more details please look at [Milestone ${{inputs.client-milestone-number}}]( https://github.com/mercedes-benz/sechub/milestone/${{inputs.client-milestone-number}}?closed=1) - draft: true - prerelease: false - - - name: Create client release asset sechub-cli-${{ inputs.client-version }}.zip + - name: Create client binary release asset sechub-cli-${{ inputs.client-version }}.zip if: inputs.client-version != '' run: | cd sechub-cli/build/go zip -r sechub-cli.zip platform sha256sum sechub-cli.zip > sechub-cli.zip.sha256 - - name: Upload Client release asset sechub-cli-${{ inputs.client-version }}.zip - if: inputs.client-version != '' - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_client_release.outputs.upload_url }} - asset_path: ./sechub-cli/build/go/sechub-cli.zip - asset_name: sechub-cli-${{ inputs.client-version }}.zip - asset_content_type: application/zip - - - name: Upload Client release asset sechub-cli-${{ inputs.client-version }}.zip.sha256 + - name: Create client Debian packages if: inputs.client-version != '' - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_client_release.outputs.upload_url }} - asset_path: ./sechub-cli/build/go/sechub-cli.zip.sha256 - asset_name: sechub-cli-${{ inputs.client-version }}.zip.sha256 - asset_content_type: text/plain + shell: bash + run: sechub-cli/script/build-debian-packages.sh ${{ inputs.client-version }} - - name: Upload sechub-client.pdf release asset - id: upload-sechub-doc-client-release-asset + - name: Create client ${{ inputs.client-version }} release draft if: inputs.client-version != '' - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 + shell: bash + run: | + assets=() + echo "# Add Client binaries sechub-cli-${{ inputs.client-version }}.zip + checksum" + assets+=("-a" "sechub-cli/build/go/sechub-cli.zip#sechub-cli-${{ inputs.client-version }}.zip") + assets+=("-a" "sechub-cli/build/go/sechub-cli.zip.sha256#sechub-cli-${{ inputs.client-version }}.zip.sha256") + echo "# Add Debian packages" + for asset in sechub-cli/build/deb-build/*.deb ; do + filename=`basename "$asset"` + assets+=("-a" "${asset}#${filename}") + done + echo "# Add Client documentation sechub-client-${{ inputs.client-version }}.pdf" + assets+=("-a" "sechub-doc/build/docs/asciidoc/sechub-client.pdf#sechub-client-${{ inputs.client-version }}.pdf") + # Define release data + tag_name="v${{ inputs.client-version }}-client" + release_title="Client Version ${{ inputs.client-version }}" + release_message="Changes in this Release + - Some minor changes on client implementation" + release_footer="For more details please look at [Milestone ${{inputs.client-milestone-number}}]( https://github.com/mercedes-benz/sechub/milestone/${{inputs.client-milestone-number}}?closed=1)" + echo "# Create release draft \"$release_title\" on github" + hub release create --draft "${assets[@]}" -m "$release_title" -m "$release_message" -m "$release_footer" "$tag_name" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_client_release.outputs.upload_url }} - asset_path: ./sechub-doc/build/docs/asciidoc/sechub-client.pdf - asset_name: sechub-client-${{ inputs.client-version }}.pdf - asset_content_type: application/pdf - name: Create Client ${{ inputs.client-version }} release issue if: inputs.client-version != '' diff --git a/.github/workflows/release-web-ui.yml b/.github/workflows/release-web-ui.yml index 3a193dd16a..d9e433f452 100644 --- a/.github/workflows/release-web-ui.yml +++ b/.github/workflows/release-web-ui.yml @@ -112,7 +112,7 @@ jobs: npm run build && \ cd dist && \ echo '${{ inputs.web-ui-version }}' > sechub-web-ui_version.txt && \ - zip -r ../../../$WEB_UI_RELEASE_ZIPFILE * + zip -r ../../$WEB_UI_RELEASE_ZIPFILE * - name: Collect GIT status if: always() diff --git a/README.adoc b/README.adoc index 1f8a6e97d3..45b1d073d3 100644 --- a/README.adoc +++ b/README.adoc @@ -13,7 +13,8 @@ toc::[] image::sechub-doc/src/docs/asciidoc/images/sechub-logo.png["Eugen" - the SecHub mascot] -The free and open-source security platform SecHub, provides a central API to test software with different security tools. Many free and open-source as well proprietary security tools are supported by SecHub. +The free and open-source security platform SecHub, provides a central API to test software with different security tools. +SecHub supports many free and open-source as well as proprietary security tools. SecHub features: diff --git a/gradle/build-versioning.gradle b/gradle/build-versioning.gradle index c065072e9a..2d9fcde3c7 100644 --- a/gradle/build-versioning.gradle +++ b/gradle/build-versioning.gradle @@ -63,7 +63,7 @@ def buildVersionFiles(){ def noStagedChanges = stagedChanges.getAllChanges().isEmpty() def hasChanged = !noUnstagedChanges || !noStagedChanges def buildNumber = getBuildNr() - def docsTimeStamp = getLocalBuildNr() + def docsTimeStamp = getTimeStamp() def currentGitCommit = git.head().abbreviatedId // ------------------------ @@ -336,8 +336,8 @@ def buildVersionString(commitTag, boolean hasChanged, buildNumber){ calcversion = calcversion - "-libraries" calcversion = calcversion - "-pds-tools" calcversion = calcversion - "-pds" - calcversion = calcversion - "-server" calcversion = calcversion - "-web-server" + calcversion = calcversion - "-server" calcversion = calcversion - "-checkmarx-wrapper" calcversion = calcversion - "-owaspzap-wrapper" calcversion = calcversion - "-prepare-wrapper" @@ -349,20 +349,22 @@ def buildVersionString(commitTag, boolean hasChanged, buildNumber){ if (hasChanged){ calcversion = "${calcversion}-dirty" } - calcversion = "${calcversion}-${buildNumber}" + if (buildNumber != "") { + calcversion = "${calcversion}-${buildNumber}" + } return calcversion } def getBuildNr(){ - if (getServerBuildNr()!=null){ + if (getServerBuildNr()!=null) { return "b"+getServerBuildNr() - }else{ + } else { if (project.hasProperty('sechub.build.timestamp')){ if (project.getProperty('sechub.build.timestamp')=="false"){ return "latest" } } - return getLocalBuildNr() + return "" } } @@ -370,8 +372,8 @@ def getServerBuildNr(){ return System.getenv('BUILD_NUMBER' ) } -def getLocalBuildNr() { - return new Date().format('yyyyMMddHHmmss') +def getTimeStamp() { + return new Date().format("yyyy-MM-dd HH:mm ('UTC'X)") } diff --git a/sechub-cli/build_go.sh b/sechub-cli/build_go.sh index 9ab65006e9..5f34495ed0 100755 --- a/sechub-cli/build_go.sh +++ b/sechub-cli/build_go.sh @@ -64,7 +64,8 @@ init_go_modules cd "$SRC_PATH/main" export CGO_ENABLED=0 # This forces statically linked binaries -GO_LD_FLAGS="-s -w" # strip (reduce size): disable debug symbol table / disable DWARF generation +GO_LD_FLAGS="-s -w -buildid=" # strip (reduce size): disable debug symbol table / disable DWARF generation +GO_COMPILE_FLAGS="-trimpath" # Aim to make builds reproducible for platform in "${platforms[@]}" ; do platform_split=(${platform//\// }) @@ -82,7 +83,7 @@ for platform in "${platforms[@]}" ; do fi echo "> building $targetSubFolder" - go build -ldflags="$GO_LD_FLAGS" -o "$buildDir/$output_name" . + go build $GO_COMPILE_FLAGS -ldflags="$GO_LD_FLAGS" -o "$buildDir/$output_name" . if [ $? -ne 0 ]; then echo 'Go build failed because of an error' exit 1 diff --git a/sechub-cli/script/build-debian-packages.sh b/sechub-cli/script/build-debian-packages.sh new file mode 100755 index 0000000000..3bd7d52f8d --- /dev/null +++ b/sechub-cli/script/build-debian-packages.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +set -e + +# Debian packaging data +DEB_PACKAGE_NAME="sechub-client" +DEB_SECTION="misc" +DEB_MAINTAINER="SecHub FOSS team " +DEB_HOMEPAGE="https://github.com/mercedes-benz/sechub" +DEB_DESCRIPTION="The SecHub command line client. See $DEB_HOMEPAGE" +DEB_BIN_PATH="usr/bin" # Where to place the SecHub client executable on install + +# Hardware architectures we build Debian packages for +ARCHITECTURE_LIST="amd64 386 arm arm64" # space separated list + +BUILD_DIR="build" +DEBIAN_BUILD_DIR="deb-build" +GO_BUILD_DIR="go/platform" +MANDATORY_EXECUTABLES="dpkg-deb fakeroot" # space separated list + +function usage { + cat - < + +This script creates Debian packages of the SecHub client for Linux +It is meant to be used for SecHub client releases + +Mandatory argument is the version tag in format .. with an optional appendix. +Examples: +- 1.10.0 +- 1.10.0-gh-build +- 1.10.0-9 +EOF +} + +function check_executable_is_installed { + executable="$1" + exe_path=`which $executable` + if [ ! -x "$exe_path" ] ; then + echo "FATAL: Mandatory executable \"$executable\" not found in PATH. Please install..." + exit 1 + fi +} + +function get_debian_architecture { + local deb_architecture + # Special case for i386 architecture + if [ "$1" = "386" ] ; then + deb_architecture="i386" + else + deb_architecture="$architecture" + fi + echo $deb_architecture +} + +function build_deb_package { + local architecture="$1" + local deb_architecture=`get_debian_architecture $architecture` + local deb_package_name="sechub-client_${SECHUB_CLIENT_VERSION}_${deb_architecture}" + local deb_dir="$DEBIAN_BUILD_DIR/$deb_package_name" + local size + echo "### Building Debian package $deb_package_name.deb" + # create dirs + mkdir -p "$deb_dir/DEBIAN" "$deb_dir/$DEB_BIN_PATH" + # copy executable into destination dir + cp "$GO_BUILD_DIR/linux-$architecture/sechub" "$deb_dir/$DEB_BIN_PATH" + # determine file size in bytes + size=`cat "$deb_dir/$DEB_BIN_PATH/sechub" | wc --bytes` + # Create Debian package meta data + cat - < "$deb_dir/DEBIAN/control" +Package: $DEB_PACKAGE_NAME +Version: $SECHUB_CLIENT_VERSION +Section: $DEB_SECTION +Architecture: $deb_architecture +Priority: optional +Essential: no +Installed-Size: $size +Homepage: $DEB_HOMEPAGE +Maintainer: $DEB_MAINTAINER +Description: $DEB_DESCRIPTION +EOF + # Create Debian package + fakeroot dpkg-deb --build "$deb_dir" +} + +################ + +# Check prepreqs +for i in $MANDATORY_EXECUTABLES ; do + check_executable_is_installed $i +done + +SECHUB_CLIENT_VERSION=$1 + +FAILED=false +if [ -z "$SECHUB_CLIENT_VERSION" ] ; then + echo "Please provide a version tag as 1st argument" + FAILED=true +elif [[ ! "$SECHUB_CLIENT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then + echo "Provided version tag is invalid" + FAILED=true +fi + +cd `dirname $0`/.. +if [ ! -d "$BUILD_DIR/$GO_BUILD_DIR" ] ; then + echo "Please build the SecHub client executables first. './gradlew buildGo testGo'" + FAILED=true +fi + +if $FAILED ; then + usage + exit 1 +fi + +cd "$BUILD_DIR" +mkdir -p "$DEBIAN_BUILD_DIR" +for arch in $ARCHITECTURE_LIST ; do + build_deb_package $arch +done diff --git a/sechub-doc/src/docs/asciidoc/documents/techdoc/05_build.adoc b/sechub-doc/src/docs/asciidoc/documents/techdoc/05_build.adoc index f4eff1d77f..b4e0c27060 100644 --- a/sechub-doc/src/docs/asciidoc/documents/techdoc/05_build.adoc +++ b/sechub-doc/src/docs/asciidoc/documents/techdoc/05_build.adoc @@ -99,9 +99,12 @@ Just call ./gradlew documentation ---- -==== Publish artefacts -Just call ----- -./gradlew publish ----- -_(if not already builds done this will be triggered automatically)_ \ No newline at end of file +=== Publishing artifacts / development naming convention +https://github.com/mercedes-benz/sechub/packages[Artifacts] are being published automatically when a https://github.com/mercedes-benz/sechub/actions?query=workflow%3A%22Release*%22[release workflow] runs on github.com. + +If you publish artifacts while developing and testing then make sure that the versioning tag contains "-SNAPSHOT" behind the product version. + +Examples (SecHub server 1.10.0 development): + +- `1.10.0_alpine-SNAPSHOT` + +- `1.10.0_alpine-SNAPSHOT1` + +- `1.10.0_alpine-SNAPSHOT-2024-11-30` diff --git a/sechub-doc/src/main/java/com/mercedesbenz/sechub/docgen/util/DocGeneratorUtil.java b/sechub-doc/src/main/java/com/mercedesbenz/sechub/docgen/util/DocGeneratorUtil.java index 6e4208fe27..47eaca42dc 100644 --- a/sechub-doc/src/main/java/com/mercedesbenz/sechub/docgen/util/DocGeneratorUtil.java +++ b/sechub-doc/src/main/java/com/mercedesbenz/sechub/docgen/util/DocGeneratorUtil.java @@ -84,21 +84,28 @@ static Class fetchClass(AnnotatedElement element) { /** * Reduces string to second upper cased char - e.g. "NetsparkerInstallSetupImpl" - * would be replaced to "Netsparker" + * would be replaced to "Netsparker". Having multiple upper case letters at the + * beginning will keep all upper cased parts. E.g. "SMTPServerConfiguration" + * will become "SMTPServer" * * @param clazz - * @return + * @return string, never null */ public static String toCamelOne(Class clazz) { StringBuilder sb = new StringBuilder(); String clazzName = clazz.getSimpleName(); boolean first = true; + boolean atLeastOneLowerCaseFound = false; for (char c : clazzName.toCharArray()) { if (first) { first = false; } else { - if (Character.isUpperCase(c)) { + boolean upperCase = Character.isUpperCase(c); + if (!atLeastOneLowerCaseFound) { + atLeastOneLowerCaseFound = !upperCase; + } + if (upperCase && atLeastOneLowerCaseFound) { break; } } diff --git a/sechub-doc/src/test/java/com/mercedesbenz/sechub/docgen/util/DocGenUtilTest.java b/sechub-doc/src/test/java/com/mercedesbenz/sechub/docgen/util/DocGenUtilTest.java index c38ff2d0d8..521403f05c 100644 --- a/sechub-doc/src/test/java/com/mercedesbenz/sechub/docgen/util/DocGenUtilTest.java +++ b/sechub-doc/src/test/java/com/mercedesbenz/sechub/docgen/util/DocGenUtilTest.java @@ -11,6 +11,9 @@ import com.mercedesbenz.sechub.docgen.DocAnnotationData; import com.mercedesbenz.sechub.docgen.spring.SpringValueFilter; +import com.mercedesbenz.sechub.domain.notification.email.SMTPServerConfiguration; +import com.mercedesbenz.sechub.domain.scan.product.checkmarx.SecHubDirectCheckmarxResilienceConfiguration; +import com.mercedesbenz.sechub.domain.scan.product.pds.PDSResilienceConsultant; import com.mercedesbenz.sechub.sharedkernel.MustBeDocumented; public class DocGenUtilTest { @@ -40,6 +43,11 @@ public void toCamelOne_returns_first_part_of_simple_classname_until_second_upper assertEquals("String", DocGeneratorUtil.toCamelOne(String.class)); assertEquals("Class", DocGeneratorUtil.toCamelOne(Class.class)); + assertEquals("Sec", DocGeneratorUtil.toCamelOne(SecHubDirectCheckmarxResilienceConfiguration.class)); + + assertEquals("SMTPServer", DocGeneratorUtil.toCamelOne(SMTPServerConfiguration.class)); + assertEquals("PDSResilience", DocGeneratorUtil.toCamelOne(PDSResilienceConsultant.class)); + } } diff --git a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/usecases/UseCaseRestDoc.java b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/usecases/UseCaseRestDoc.java index 982cf065ba..8190e25757 100644 --- a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/usecases/UseCaseRestDoc.java +++ b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/usecases/UseCaseRestDoc.java @@ -50,6 +50,7 @@ SpringRestDocOutput[] wanted() default { /* @formatter:off */ SpringRestDocOutput.PATH_PARAMETERS, + SpringRestDocOutput.QUERY_PARAMETERS, SpringRestDocOutput.REQUEST_PARAMETERS, @@ -91,6 +92,8 @@ public enum SpringRestDocOutput{ PATH_PARAMETERS("path-parameters.adoc",SpringRestDocType.DEFINITION), + QUERY_PARAMETERS("query-parameters.adoc",SpringRestDocType.DEFINITION), + REQUEST_PARAMETERS("request-parameters.adoc",SpringRestDocType.DEFINITION), REQUEST_HEADERS("request-headers.adoc",SpringRestDocType.DEFINITION), diff --git a/sechub-web-server-solution/env b/sechub-web-server-solution/env index f80584d67c..347e24f2eb 100644 --- a/sechub-web-server-solution/env +++ b/sechub-web-server-solution/env @@ -6,7 +6,7 @@ BASE_IMAGE=debian:12-slim # build - clones and build SecHub # copy - copies jar into container # download - downloads the SecHub jar -BUILD_TYPE=build +BUILD_TYPE=download # The SecHub web-server version used if the BUILD_TYPE is set to `download` WEB_SERVER_VERSION="0.1.0" diff --git a/sechub-web-server-solution/helm/web-server/Chart.yaml b/sechub-web-server-solution/helm/web-server/Chart.yaml index 43e354351e..aa77267b64 100644 --- a/sechub-web-server-solution/helm/web-server/Chart.yaml +++ b/sechub-web-server-solution/helm/web-server/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: web-server -description: SecHub Web Server Helm chart for Kubernetes +description: SecHub Web Server (Web-UI backend) Helm chart for Kubernetes home: https://github.com/mercedes-benz/sechub type: application # This is the chart version. # This version number should be incremented each time you make changes to the chart and its templates. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.0 +version: 1.0.0 diff --git a/sechub-web-server-solution/helm/web-server/templates/deployment.yaml b/sechub-web-server-solution/helm/web-server/templates/deployment.yaml index 4b3410e800..85e8822f2f 100644 --- a/sechub-web-server-solution/helm/web-server/templates/deployment.yaml +++ b/sechub-web-server-solution/helm/web-server/templates/deployment.yaml @@ -32,43 +32,8 @@ spec: - name: secret-web-ui-ssl-volume secret: secretName: secret-web-ui-ssl -{{- end }} -{{- if .Values.go_mmproxy.enabled }} - initContainers: - - name: setup - image: {{ .Values.go_mmproxy.image }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: - - "/bin/sh" - - "-cx" - args: - - | - /sbin/ip rule add from 127.0.0.1/8 iif lo table 123 - /sbin/ip route add local 0.0.0.0/0 dev lo table 123 - securityContext: - capabilities: - add: - - NET_ADMIN {{- end }} containers: -{{- if .Values.go_mmproxy.enabled }} - # go-mmproxy sidecar container - - name: go-mmproxy - image: {{ .Values.go_mmproxy.image }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - ports: - - containerPort: 8080 - securityContext: - capabilities: - add: - - NET_ADMIN - args: - - "-v=0" # loglevel 0 - no logging ; 1 - log errors ; 2 - log all state changes - - "-l" # listen - - "0.0.0.0:8080" # on port 8080 - - "-4" # tcp v4 - - "127.0.0.1:4443" # forward to SecHub Web Server container (localhost port 4443) -{{- end }} # SecHub web-server container - name: web-server image: {{ .Values.image }} @@ -129,9 +94,9 @@ spec: - name: DEPLOYMENT_COMMENT value: "{{ .Values.deploymentComment }}" {{- end }} -{{- if .Values.web_server.loggingType }} +{{- if .Values.web_server.logging.type.enabled }} - name: LOGGING_TYPE - value: "{{ .Values.web_server.loggingType }}" + value: "{{ .Values.web_server.logging.type.appenderName }}" {{- end }} # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # + Connection to SecHub server diff --git a/sechub-web-server-solution/helm/web-server/templates/networkpolicy.yaml b/sechub-web-server-solution/helm/web-server/templates/networkpolicy.yaml index ff12d41f6e..61e2edfaa2 100644 --- a/sechub-web-server-solution/helm/web-server/templates/networkpolicy.yaml +++ b/sechub-web-server-solution/helm/web-server/templates/networkpolicy.yaml @@ -5,6 +5,9 @@ kind: NetworkPolicy metadata: name: web-server-policy spec: + podSelector: + matchLabels: + name: web-server ingress: - from: - podSelector: @@ -13,13 +16,3 @@ spec: ports: - protocol: TCP port: 4443 - - ports: -{{- if .Values.go_mmproxy.enabled }} - - port: 8080 -{{- else }} - - port: 4443 -{{- end }} - protocol: TCP - podSelector: - matchLabels: - name: web-server diff --git a/sechub-web-server-solution/helm/web-server/templates/service-internal.yaml b/sechub-web-server-solution/helm/web-server/templates/service-internal.yaml deleted file mode 100644 index d872515b2f..0000000000 --- a/sechub-web-server-solution/helm/web-server/templates/service-internal.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-License-Identifier: MIT - -# Internal access via cluster IP (maybe obsolete when an api-gateway is in place) -apiVersion: v1 -kind: Service -metadata: - name: web-server-internal -spec: - selector: - name: web-server - ports: - - protocol: TCP - port: 4443 - targetPort: 4443 - type: ClusterIP diff --git a/sechub-web-server-solution/helm/web-server/templates/service.yaml b/sechub-web-server-solution/helm/web-server/templates/service.yaml index 5fe7239b17..80b66aaadd 100644 --- a/sechub-web-server-solution/helm/web-server/templates/service.yaml +++ b/sechub-web-server-solution/helm/web-server/templates/service.yaml @@ -1,30 +1,15 @@ # SPDX-License-Identifier: MIT +# Internal access via cluster IP (maybe obsolete when an api-gateway is in place) apiVersion: v1 kind: Service metadata: name: web-server - labels: - name: web-server -{{- if .Values.service.annotations }} - annotations: - {{ .Values.service.annotations | indent 4 | trim }} -{{- end }} -{{- if .Values.service.finalizers }} - finalizers: - {{ .Values.service.finalizers | indent 4 | trim }} -{{- end }} spec: - type: LoadBalancer - loadBalancerIP: {{ .Values.service.loadbalancer.ip }} selector: name: web-server ports: - - name: {{ .Values.service.loadbalancer.port.name }} - port: {{ .Values.service.loadbalancer.port.number }} - protocol: TCP -{{- if .Values.go_mmproxy.enabled }} - targetPort: 8080 -{{- else }} + - protocol: TCP + port: 4443 targetPort: 4443 -{{- end }} + type: ClusterIP diff --git a/sechub-web-server-solution/helm/web-server/values.yaml b/sechub-web-server-solution/helm/web-server/values.yaml index 17ea66e881..53d3e28886 100644 --- a/sechub-web-server-solution/helm/web-server/values.yaml +++ b/sechub-web-server-solution/helm/web-server/values.yaml @@ -70,23 +70,6 @@ web_server: # This way, you can force deployments e.g. when only secrets have changed. deploymentComment: "my deployment comment" -service: - loadbalancer: - ip: "" - port: - name: web-server-https - number: 443 - # optional: Add annotations (goes to metadata.annotations) - # Can contain multiple lines. Example: - # annotations: |- - # loadbalancer.openstack.org/keep-floatingip: "true" - # loadbalancer.openstack.org/proxy-protocol: "true" - # - # optional: Add finalizers (goes to metadata.finalizers) - # Can contain multiple lines. Example: - # finalizers: |- - # - service.kubernetes.io/load-balancer-cleanup - # optional: Add annotations to template.metadata.annotations # Can contain multiple lines. Example for Prometheus actuator: # templateMetadataAnnotations: |- @@ -106,13 +89,3 @@ service: # secretKeyRef: # name: secret-web-server-example # key: password - -go_mmproxy: - # Log the real client IP addresses via a go-mmproxy sidecar container - # Otherwise one sees only the loadbalancer's IP in the logs. - # go-mmproxy -> https://github.com/path-network/go-mmproxy - # Spoofs the real client address taken from proxy-protocol so the SecHub server will log correctly. - # (needs annotation loadbalancer.openstack.org/proxy-protocol: "true" - see above) - enabled: false - # Choose a "go-mmproxy" docker image. See e.g. https://hub.docker.com/search?q=go-mmproxy - image: "example.org/go-mmproxy:2.1.0" diff --git a/sechub-web-server/src/main/resources/banner.txt b/sechub-web-server/src/main/resources/banner.txt new file mode 100644 index 0000000000..c071cd43f1 --- /dev/null +++ b/sechub-web-server/src/main/resources/banner.txt @@ -0,0 +1,8 @@ + ____ _ _ _ __ __ _ ____ + / ___| ___ ___| | | |_ _| |__ \ \ / /__| |__/ ___| ___ _ ____ _____ _ __ + \___ \ / _ \/ __| |_| | | | | '_ \ \ \ /\ / / _ \ '_ \___ \ / _ \ '__\ \ / / _ \ '__| + ___) | __/ (__| _ | |_| | |_) | \ V V / __/ |_) |__) | __/ | \ V / __/ | + |____/ \___|\___|_| |_|\__,_|_.__/ \_/\_/ \___|_.__/____/ \___|_| \_/ \___|_| + +:: SecHub Web Server :: ${application.formatted-version} +:: Spring Boot :: ${spring-boot.formatted-version} \ No newline at end of file diff --git a/sechub-web-server/src/main/resources/logback-spring.xml b/sechub-web-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..763b30380f --- /dev/null +++ b/sechub-web-server/src/main/resources/logback-spring.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sechub-web-ui-solution/docker/nginx/nginx.conf b/sechub-web-ui-solution/docker/nginx/nginx.conf index 999678218e..be47f6a5e3 100644 --- a/sechub-web-ui-solution/docker/nginx/nginx.conf +++ b/sechub-web-ui-solution/docker/nginx/nginx.conf @@ -26,22 +26,22 @@ http { } location /api { - proxy_pass https://web-server-internal:4443/api; + proxy_pass https://web-server:4443/api; include sechub_proxy_settings.conf; } location /error { - proxy_pass https://web-server-internal:4443/error; + proxy_pass https://web-server:4443/error; include sechub_proxy_settings.conf; } location /login { - proxy_pass https://web-server-internal:4443/login; + proxy_pass https://web-server:4443/login; include sechub_proxy_settings.conf; } location /oauth2 { - proxy_pass https://web-server-internal:4443/oauth2; + proxy_pass https://web-server:4443/oauth2; include sechub_proxy_settings.conf; } diff --git a/sechub-web-ui-solution/env b/sechub-web-ui-solution/env index d397754f59..bde262d728 100644 --- a/sechub-web-ui-solution/env +++ b/sechub-web-ui-solution/env @@ -1,10 +1,6 @@ -# Node Version +# Base image Version BASE_IMAGE=debian:12-slim -# Resource limits -MEMORY_LIMIT=300M -CPU_LIMIT=1.0 - # The build type of SecHub inside the container # Possible values are: build, copy, download (currently only copy) # build - clones and build from SecHub repository @@ -13,9 +9,9 @@ CPU_LIMIT=1.0 BUILD_TYPE=download # The PDS version used if the BUILD_TYPE is set to `download` -WEB_UI_VERSION="0.1.0" +WEB_UI_VERSION="0.2.0" # Git information if the BUILD_TYPE is set to `build` GIT_TAG="" GIT_BRANCH="" -WEB_UI_SSL_KEYSTORE_ALIAS="undefined" \ No newline at end of file +WEB_UI_SSL_KEYSTORE_ALIAS="undefined" diff --git a/sechub-web-ui/index.html b/sechub-web-ui/index.html index 44eb85db39..2ff910aabd 100644 --- a/sechub-web-ui/index.html +++ b/sechub-web-ui/index.html @@ -5,7 +5,7 @@ - Welcome to Vuetify 3 + SecHub diff --git a/sechub-web-ui/package-lock.json b/sechub-web-ui/package-lock.json index 654d9f1b3a..e6641b0292 100644 --- a/sechub-web-ui/package-lock.json +++ b/sechub-web-ui/package-lock.json @@ -12,10 +12,12 @@ "core-js": "^3.37.1", "roboto-fontface": "*", "vue": "^3.4.31", + "vue-i18n": "^10.0.4", "vuetify": "^3.6.11" }, "devDependencies": { "@babel/types": "^7.24.7", + "@intlify/unplugin-vue-i18n": "^6.0.0", "@types/node": "^20.14.10", "@vitejs/plugin-vue": "^5.0.5", "@vue/eslint-config-typescript": "^13.0.0", @@ -689,6 +691,261 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@intlify/bundle-utils": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-10.0.0.tgz", + "integrity": "sha512-BR5yLOkF2dzrARTbAg7RGAIPcx9Aark7p1K/0O285F7rfzso9j2dsa+S4dA67clZ0rToZ10NSSTfbyUptVu7Bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@intlify/message-compiler": "next", + "@intlify/shared": "next", + "acorn": "^8.8.2", + "escodegen": "^2.1.0", + "estree-walker": "^2.0.2", + "jsonc-eslint-parser": "^2.3.0", + "mlly": "^1.2.0", + "source-map-js": "^1.0.1", + "yaml-eslint-parser": "^1.2.2" + }, + "engines": { + "node": ">= 18" + }, + "peerDependenciesMeta": { + "petite-vue-i18n": { + "optional": true + }, + "vue-i18n": { + "optional": true + } + } + }, + "node_modules/@intlify/core-base": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-10.0.4.tgz", + "integrity": "sha512-GG428DkrrWCMhxRMRQZjuS7zmSUzarYcaHJqG9VB8dXAxw4iQDoKVQ7ChJRB6ZtsCsX3Jse1PEUlHrJiyQrOTg==", + "license": "MIT", + "dependencies": { + "@intlify/message-compiler": "10.0.4", + "@intlify/shared": "10.0.4" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-10.0.4.tgz", + "integrity": "sha512-AFbhEo10DP095/45EauinQJ5hJ3rJUmuuqltGguvc3WsvezZN+g8qNHLGWKu60FHQVizMrQY7VJ+zVlBXlQQkQ==", + "license": "MIT", + "dependencies": { + "@intlify/shared": "10.0.4", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-10.0.4.tgz", + "integrity": "sha512-ukFn0I01HsSgr3VYhYcvkTCLS7rGa0gw4A4AMpcy/A9xx/zRJy7PS2BElMXLwUazVFMAr5zuiTk3MQeoeGXaJg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/unplugin-vue-i18n": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@intlify/unplugin-vue-i18n/-/unplugin-vue-i18n-6.0.0.tgz", + "integrity": "sha512-PhFdVR0YggJcvbFrfXTKRv5S6/DPy7FPBtepVIloDpOvco5FHJYKHyaPXqMMWhN1o8MiD2KnSwS2222zWAQs+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@intlify/bundle-utils": "^10.0.0", + "@intlify/shared": "latest", + "@intlify/vue-i18n-extensions": "^7.0.0", + "@rollup/pluginutils": "^5.1.0", + "@typescript-eslint/scope-manager": "^8.13.0", + "@typescript-eslint/typescript-estree": "^8.13.0", + "debug": "^4.3.3", + "fast-glob": "^3.2.12", + "js-yaml": "^4.1.0", + "json5": "^2.2.3", + "pathe": "^1.0.0", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2", + "unplugin": "^1.1.0", + "vue": "^3.4" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "petite-vue-i18n": "*", + "vue": "^3.2.25", + "vue-i18n": "*" + }, + "peerDependenciesMeta": { + "petite-vue-i18n": { + "optional": true + }, + "vue-i18n": { + "optional": true + } + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/@typescript-eslint/scope-manager": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", + "integrity": "sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/@typescript-eslint/types": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.15.0.tgz", + "integrity": "sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz", + "integrity": "sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz", + "integrity": "sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.15.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@intlify/vue-i18n-extensions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@intlify/vue-i18n-extensions/-/vue-i18n-extensions-7.0.0.tgz", + "integrity": "sha512-MtvfJnb4aklpCU5Q/dkWkBT/vGsp3qERiPIwtTq5lX4PCLHtUprAJZp8wQj5ZcwDaFCU7+yVMjYbeXpIf927cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.24.6", + "@intlify/shared": "^10.0.0", + "@vue/compiler-dom": "^3.2.45", + "vue-i18n": "^10.0.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@intlify/shared": "^9.0.0 || ^10.0.0", + "@vue/compiler-dom": "^3.0.0", + "vue": "^3.0.0", + "vue-i18n": "^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "@intlify/shared": { + "optional": true + }, + "@vue/compiler-dom": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-i18n": { + "optional": true + } + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -1420,7 +1677,6 @@ "version": "6.6.4", "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", - "dev": true, "license": "MIT" }, "node_modules/@vue/eslint-config-typescript": { @@ -2426,6 +2682,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, "node_modules/eslint": { "version": "8.57.1", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", @@ -3020,6 +3298,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", @@ -4012,6 +4304,25 @@ "json5": "lib/cli.js" } }, + "node_modules/jsonc-eslint-parser": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.0.tgz", + "integrity": "sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.5.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -4932,6 +5243,17 @@ "node": ">=8" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -5641,6 +5963,26 @@ "eslint": ">=6.0.0" } }, + "node_modules/vue-i18n": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-10.0.4.tgz", + "integrity": "sha512-1xkzVxqBLk2ZFOmeI+B5r1J7aD/WtNJ4j9k2mcFcQo5BnOmHBmD7z4/oZohh96AAaRZ4Q7mNQvxc9h+aT+Md3w==", + "license": "MIT", + "dependencies": { + "@intlify/core-base": "10.0.4", + "@intlify/shared": "10.0.4", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-router": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.5.tgz", @@ -5805,6 +6147,24 @@ "node": ">= 14" } }, + "node_modules/yaml-eslint-parser": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-1.2.3.tgz", + "integrity": "sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.0.0", + "lodash": "^4.17.21", + "yaml": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/sechub-web-ui/package.json b/sechub-web-ui/package.json index 5de1bf2b12..f1a109fc30 100644 --- a/sechub-web-ui/package.json +++ b/sechub-web-ui/package.json @@ -12,10 +12,12 @@ "core-js": "^3.37.1", "roboto-fontface": "*", "vue": "^3.4.31", + "vue-i18n": "^10.0.4", "vuetify": "^3.6.11" }, "devDependencies": { "@babel/types": "^7.24.7", + "@intlify/unplugin-vue-i18n": "^6.0.0", "@types/node": "^20.14.10", "@vitejs/plugin-vue": "^5.0.5", "@vue/eslint-config-typescript": "^13.0.0", diff --git a/sechub-web-ui/public/favicon.ico b/sechub-web-ui/public/favicon.ico index 8fb9f91b3a..3cb6ef7892 100644 Binary files a/sechub-web-ui/public/favicon.ico and b/sechub-web-ui/public/favicon.ico differ diff --git a/sechub-web-ui/src/assets/logo.png b/sechub-web-ui/src/assets/logo.png deleted file mode 100644 index a5f23ae7bf..0000000000 Binary files a/sechub-web-ui/src/assets/logo.png and /dev/null differ diff --git a/sechub-web-ui/src/assets/logo.svg b/sechub-web-ui/src/assets/logo.svg deleted file mode 100644 index d57771c6df..0000000000 --- a/sechub-web-ui/src/assets/logo.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/sechub-web-ui/src/assets/sechub-logo.svg b/sechub-web-ui/src/assets/sechub-logo.svg new file mode 100644 index 0000000000..39495203c3 --- /dev/null +++ b/sechub-web-ui/src/assets/sechub-logo.svg @@ -0,0 +1,494 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sechub-web-ui/src/components.d.ts b/sechub-web-ui/src/components.d.ts index 40db9751e7..a2f3fbe49f 100644 --- a/sechub-web-ui/src/components.d.ts +++ b/sechub-web-ui/src/components.d.ts @@ -8,7 +8,8 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { - AppFooter: typeof import('./components/AppFooter.vue')['default'] + AppHeader: typeof import('./components/AppHeader.vue')['default'] + Projects: typeof import('./components/Projects.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SecHubDefault: typeof import('./components/SecHubDefault.vue')['default'] diff --git a/sechub-web-ui/src/components/AppFooter.vue b/sechub-web-ui/src/components/AppFooter.vue deleted file mode 100644 index eab590d23c..0000000000 --- a/sechub-web-ui/src/components/AppFooter.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - diff --git a/sechub-web-ui/src/components/AppHeader.vue b/sechub-web-ui/src/components/AppHeader.vue new file mode 100644 index 0000000000..20a1e588d9 --- /dev/null +++ b/sechub-web-ui/src/components/AppHeader.vue @@ -0,0 +1,61 @@ + + + + + + \ No newline at end of file diff --git a/sechub-web-ui/src/components/Projects.vue b/sechub-web-ui/src/components/Projects.vue new file mode 100644 index 0000000000..03047daca0 --- /dev/null +++ b/sechub-web-ui/src/components/Projects.vue @@ -0,0 +1,66 @@ + + + + + + \ No newline at end of file diff --git a/sechub-web-ui/src/components/SecHubDefault.vue b/sechub-web-ui/src/components/SecHubDefault.vue index e0c130bc36..e795fa08df 100644 --- a/sechub-web-ui/src/components/SecHubDefault.vue +++ b/sechub-web-ui/src/components/SecHubDefault.vue @@ -10,7 +10,7 @@ max-width="900" >
-
Welcome to
+
{{ $t('GREETING') }}

SecHub!

diff --git a/sechub-web-ui/src/i18n/index.ts b/sechub-web-ui/src/i18n/index.ts new file mode 100644 index 0000000000..217fb09d50 --- /dev/null +++ b/sechub-web-ui/src/i18n/index.ts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT + +import {createI18n} from 'vue-i18n'; + +import en from './locales/en.json'; + +const i18n = createI18n({ + legacy: false, + locale: 'en', + fallbackLocale: 'en', + messages: { + en + }, +}) + +export default i18n \ No newline at end of file diff --git a/sechub-web-ui/src/i18n/locales/en.json b/sechub-web-ui/src/i18n/locales/en.json new file mode 100644 index 0000000000..0c3f8b5751 --- /dev/null +++ b/sechub-web-ui/src/i18n/locales/en.json @@ -0,0 +1,6 @@ +{ + "GREETING": "Welcome", + "PROJECTS": "Projects", + "OWNED": "owned", + "MEMBER": "member" +} \ No newline at end of file diff --git a/sechub-web-ui/src/layouts/default.vue b/sechub-web-ui/src/layouts/default.vue index 21ebb23ddb..89b5ff6cf9 100644 --- a/sechub-web-ui/src/layouts/default.vue +++ b/sechub-web-ui/src/layouts/default.vue @@ -1,14 +1,18 @@ - + \ No newline at end of file diff --git a/sechub-web-ui/src/pages/README.md b/sechub-web-ui/src/pages/README.md index b60017ab8d..f3a096d2da 100644 --- a/sechub-web-ui/src/pages/README.md +++ b/sechub-web-ui/src/pages/README.md @@ -4,3 +4,6 @@ Vue components created in this folder will automatically be converted to navigatable routes. Full documentation for this feature can be found in the Official [unplugin-vue-router](https://github.com/posva/unplugin-vue-router) repository. + +Please note: since the project overview is our landing page, it is the component in the index.vue. +For every new page, create a vue file here. diff --git a/sechub-web-ui/src/pages/index.vue b/sechub-web-ui/src/pages/index.vue index 1e9340fa2e..f385417248 100644 --- a/sechub-web-ui/src/pages/index.vue +++ b/sechub-web-ui/src/pages/index.vue @@ -1,9 +1,8 @@ diff --git a/sechub-web-ui/src/plugins/index.ts b/sechub-web-ui/src/plugins/index.ts index c22bfc77e7..42885eace3 100644 --- a/sechub-web-ui/src/plugins/index.ts +++ b/sechub-web-ui/src/plugins/index.ts @@ -8,6 +8,8 @@ // Plugins import vuetify from './vuetify' import router from '../router' +import i18n from '@/i18n'; + // Types import type { App } from 'vue' @@ -16,4 +18,5 @@ export function registerPlugins (app: App) { app .use(vuetify) .use(router) + .use (i18n) } diff --git a/sechub-web-ui/src/plugins/vuetify.ts b/sechub-web-ui/src/plugins/vuetify.ts index c654e043b5..e2f2fba9a2 100644 --- a/sechub-web-ui/src/plugins/vuetify.ts +++ b/sechub-web-ui/src/plugins/vuetify.ts @@ -8,6 +8,9 @@ // Styles import '@mdi/font/css/materialdesignicons.css' import 'vuetify/styles' +import { aliases, mdi } from 'vuetify/iconsets/mdi'; +import lightTheme from '../themes/lightTheme'; +import darkTheme from '../themes/darkTheme'; // Composables import { createVuetify } from 'vuetify' @@ -15,6 +18,17 @@ import { createVuetify } from 'vuetify' // https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides export default createVuetify({ theme: { - defaultTheme: 'dark', + defaultTheme: 'lightTheme', + themes: { + lightTheme, + darkTheme, + }, }, + icons: { + defaultSet: 'mdi', + aliases, + sets: { + mdi, + }, + } }) diff --git a/sechub-web-ui/src/themes/README.md b/sechub-web-ui/src/themes/README.md new file mode 100644 index 0000000000..e081b7a6b6 --- /dev/null +++ b/sechub-web-ui/src/themes/README.md @@ -0,0 +1,7 @@ + +# Themes + +in this direction custom themes can be defined or overwritten. +For each theme a new file can be placed here and included in vuetify.ts. + +The custom colors can be accessed via variables. Eg. custom color MyCustomColo: FF0000 the variable -v-theme-MyCustomColor is available. \ No newline at end of file diff --git a/sechub-web-ui/src/themes/darkTheme.js b/sechub-web-ui/src/themes/darkTheme.js new file mode 100644 index 0000000000..19681f1acd --- /dev/null +++ b/sechub-web-ui/src/themes/darkTheme.js @@ -0,0 +1,9 @@ +export default { + dark: true, + colors: { + primary: '#008DFC', + background_default: '#0D0D0D', + background_paper: '#1A1A1A', + layer_01: '#262626' + }, + }; \ No newline at end of file diff --git a/sechub-web-ui/src/themes/lightTheme.js b/sechub-web-ui/src/themes/lightTheme.js new file mode 100644 index 0000000000..68a3253a5f --- /dev/null +++ b/sechub-web-ui/src/themes/lightTheme.js @@ -0,0 +1,9 @@ +export default { + dark: false, + colors: { + primary: '#0078D6', + background_default: '#F4F4F4', + background_paper: '#FFFFFF', + layer_01: '#F4F4F4' + }, + }; \ No newline at end of file diff --git a/sechub-web-ui/vite.config.mts b/sechub-web-ui/vite.config.mts index 5ef05c55a6..97c2ea387d 100644 --- a/sechub-web-ui/vite.config.mts +++ b/sechub-web-ui/vite.config.mts @@ -7,10 +7,14 @@ import Layouts from 'vite-plugin-vue-layouts' import Vue from '@vitejs/plugin-vue' import VueRouter from 'unplugin-vue-router/vite' import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' +import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' + // Utilities import { defineConfig } from 'vite' import { fileURLToPath, URL } from 'node:url' +import path from 'path'; + // https://vitejs.dev/config/ export default defineConfig({ @@ -45,6 +49,10 @@ export default defineConfig({ configFile: 'src/styles/settings.scss', }, }), + VueI18nPlugin({ + include: [path.resolve(__dirname, './src/i18n/locales/**')], + strictMessage: false, + }), Fonts({ google: { families: [ { diff --git a/sechub-website/components/home/Hero.vue b/sechub-website/components/home/Hero.vue index 5d66039a26..b2f6bf40d3 100644 --- a/sechub-website/components/home/Hero.vue +++ b/sechub-website/components/home/Hero.vue @@ -11,7 +11,7 @@ import { PlayIcon } from '@heroicons/vue/20/solid';

SecHub Tool

The free and open-source security platform SecHub, provides a central API to test software with different - security tools. Many free and open-source as well proprietary security tools are supported by SecHub. + security tools. SecHub supports many free and open-source as well as proprietary security tools.