Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go Code: Rebranding Daimler -> Mercedes-Benz #959

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build-versioning.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ def buildVersionFiles(){
// ------------------------

// write version code for go client
String clientGoVersionTemplate = new File('./sechub-cli/src/daimler.com/sechub/cli/version.go.template').getText('UTF-8')
String clientGoVersionTemplate = new File('./sechub-cli/src/mercedes-benz.com/sechub/cli/version.go.template').getText('UTF-8')

def clientVersionInfo = VersionData.defineVersion("Client",buildVersionString(clientVersionCommitTag, hasChanged,buildNumber))

String clientGoVersionCode = clientGoVersionTemplate.replaceAll("__version__",clientVersionInfo.getFullVersion())
def clientVersionFile = new File('./sechub-cli/src/daimler.com/sechub/cli/version.go')
def clientVersionFile = new File('./sechub-cli/src/mercedes-benz.com/sechub/cli/version.go')
clientVersionFile.write(clientGoVersionCode)

/* write version info also as asciidoc file*/
Expand Down
2 changes: 1 addition & 1 deletion sechub-cli/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pkg
.project

# generated files:
src/daimler.com/sechub/cli/version.go
src/mercedes-benz.com/sechub/cli/version.go

# vscode files:
.vscode
Expand Down
16 changes: 8 additions & 8 deletions sechub-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ task buildGo(type: Exec, dependsOn: 'genGo') {
// https://golang.org/cmd/go/
//environment GOPATH: "${projectDir}"

workingDir "${projectDir}/src/daimler.com/sechub/"
workingDir "${projectDir}/src/mercedes-benz.com/sechub/"

if (OSUtil.isWindows()){
commandLine 'cmd', '/c', 'bash', "${projectDir}/build_go.sh","${projectDir}", new MinGWConverter().convert("${projectDir}"),'daimler.com/sechub'
commandLine 'cmd', '/c', 'bash', "${projectDir}/build_go.sh","${projectDir}", new MinGWConverter().convert("${projectDir}"),'mercedes-benz.com/sechub'
}else{
commandLine "${projectDir}/build_go.sh","${projectDir}", "${projectDir}",'daimler.com/sechub'
commandLine "${projectDir}/build_go.sh","${projectDir}", "${projectDir}",'mercedes-benz.com/sechub'
}

}
Expand All @@ -49,13 +49,13 @@ task testGo(type:Exec) {
//https://stackoverflow.com/questions/48882691/force-retesting-or-disable-test-caching
// but normally not necessary: environment GOCACHE: "off"

workingDir "${projectDir}/src/daimler.com/sechub/cli"
workingDir "${projectDir}/src/mercedes-benz.com/sechub/cli"

//on windows:
if (OSUtil.isWindows()){
commandLine 'cmd', '/c', 'go', 'test', 'daimler.com/sechub/cli', 'daimler.com/sechub/util', '-v'
commandLine 'cmd', '/c', 'go', 'test', 'mercedes-benz.com/sechub/cli', 'mercedes-benz.com/sechub/util', '-v'
}else{
commandLine 'go', 'test', 'daimler.com/sechub/cli', 'daimler.com/sechub/util', '-v'
commandLine 'go', 'test', 'mercedes-benz.com/sechub/cli', 'mercedes-benz.com/sechub/util', '-v'
}

}
Expand All @@ -67,9 +67,9 @@ task linterGo(type:Exec) {

//on windows:
if (OSUtil.isWindows()){
commandLine 'cmd', '/c', 'golint', 'daimler.com/sechub/cli', 'daimler.com/sechub/util', 'daimler.com/sechub/testutil'
commandLine 'cmd', '/c', 'golint', 'mercedes-benz.com/sechub/cli', 'mercedes-benz.com/sechub/util', 'mercedes-benz.com/sechub/testutil'
}else{
commandLine 'golint', 'daimler.com/sechub/cli', 'daimler.com/sechub/util', 'daimler.com/sechub/testutil'
commandLine 'golint', 'mercedes-benz.com/sechub/cli', 'mercedes-benz.com/sechub/util', 'mercedes-benz.com/sechub/testutil'
}

}
Expand Down
2 changes: 1 addition & 1 deletion sechub-cli/build_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package="$3"
platforms="$4"
globalBuildDir="$5"

MOD_BASENAME="daimler.com/sechub"
MOD_BASENAME="mercedes-benz.com/sechub"
SUBMODULES="cli testutil util" # Space separated list
SRC_PATH="$projectDirLinuxPath/src/$MOD_BASENAME"

Expand Down
2 changes: 1 addition & 1 deletion sechub-cli/gen_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
cd script
FILENAME_GEN_CONST_FP='constants_filepatterns_gen.go'
echo "generate '$FILENAME_GEN_CONST_FP'"
./go-gen-supported-source-extensions.sh > ./../../sechub-cli/src/daimler.com/sechub/cli/$FILENAME_GEN_CONST_FP
./go-gen-supported-source-extensions.sh > ./../../sechub-cli/src/mercedes-benz.com/sechub/cli/$FILENAME_GEN_CONST_FP
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

// Config for internal CLI calls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

// InitializeContext - initialize and validate context.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

. "daimler.com/sechub/testutil"
. "mercedes-benz.com/sechub/testutil"
)

func TestLoadConfigFile(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"os"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

type jobStatusResult struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"net/http"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

// HandleHTTPErrorAndResponse does just handle error and repsonse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os"
"path/filepath"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

// Keyword for false-posisitves json file
Expand Down Expand Up @@ -256,7 +256,7 @@ func printFinding(finding *SecHubReportFindings) {
// Example output:
// ---------------------------------------------------------------------------
// 1: Absolute Path Traversal, severity: MEDIUM
// java/com/daimler/sechub/docgen/AsciidocGenerator.java, line:28, column:35:
// java/com/mercedes-benz/sechub/docgen/AsciidocGenerator.java, line:28, column:35:
// public static void main(String[] args) throws Exception {
// ---------------------------------------------------------------------------
sechubUtil.PrintDashedLine()
Expand Down Expand Up @@ -321,7 +321,7 @@ func printFalsePositiveDefinition(falsepositive *FalsePositiveDefinition) {
// ------------------------------------------------------------------
// Creation of Temp File in Dir with Incorrect Permissions, codeScan severity: LOW
// Origin: Finding ID 3 in job f94d815c-7f69-48c3-8433-8f03d52ce32a
// File: java/com/daimler/sechub/docgen/kubernetes/KubernetesTemplateFilesGenerator.java
// File: java/com/mercedes-benz/sechub/docgen/kubernetes/KubernetesTemplateFilesGenerator.java
// Code: File secHubServer = new File("./sechub-server");
// (Added by admin at 2020-07-10 13:41:06; comment: "Only temporary directory")
// ------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"

sechubTestUtil "daimler.com/sechub/testutil"
sechubTestUtil "mercedes-benz.com/sechub/testutil"
)

func TestFalsePositivesFilePathCorrectCreated(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

/* --------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os"
"path/filepath"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

// ReportDownload - struct for handling report downloads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"

sechubTestUtil "daimler.com/sechub/testutil"
sechubTestUtil "mercedes-benz.com/sechub/testutil"
)

func TestReportFilePathCorrectCreated(t *testing.T) {
Expand Down Expand Up @@ -59,31 +59,31 @@ func TestNewSecHubReportFromFile(t *testing.T) {
"name": "Absolute Path Traversal",
"severity": "HIGH",
"code": {
"location": "java/com/daimler/sechub/docgen/AsciidocGenerator.java",
"location": "java/com/mercedes-benz/sechub/docgen/AsciidocGenerator.java",
"line": 28,
"column": 35,
"source": "\tpublic static void main(String[] args) throws Exception {/*SECHUB mockdata*/",
"relevantPart": "args",
"calls": {
"location": "java/com/daimler/sechub/docgen/AsciidocGenerator.java",
"location": "java/com/mercedes-benz/sechub/docgen/AsciidocGenerator.java",
"line": 33,
"column": 17,
"source": "\t\tString path = args[0];",
"relevantPart": "args",
"calls": {
"location": "java/com/daimler/sechub/docgen/AsciidocGenerator.java",
"location": "java/com/mercedes-benz/sechub/docgen/AsciidocGenerator.java",
"line": 33,
"column": 10,
"source": "\t\tString path = args[0];",
"relevantPart": "path",
"calls": {
"location": "java/com/daimler/sechub/docgen/AsciidocGenerator.java",
"location": "java/com/mercedes-benz/sechub/docgen/AsciidocGenerator.java",
"line": 34,
"column": 38,
"source": "\t\tFile documentsGenFolder = new File(path);",
"relevantPart": "path",
"calls": {
"location": "java/com/daimler/sechub/docgen/AsciidocGenerator.java",
"location": "java/com/mercedes-benz/sechub/docgen/AsciidocGenerator.java",
"line": 34,
"column": 29,
"source": "\t\tFile documentsGenFolder = new File(path);",
Expand All @@ -101,7 +101,7 @@ func TestNewSecHubReportFromFile(t *testing.T) {
"name": "Race Condition Format Flaw",
"severity": "LOW",
"code": {
"location": "java/com/daimler/sechub/docgen/kubernetes/KubernetesTemplateFilesGenerator.java",
"location": "java/com/mercedes-benz/sechub/docgen/kubernetes/KubernetesTemplateFilesGenerator.java",
"line": 228,
"column": 27,
"source": "\t\treturn dateFormat.format(new Date());",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"path/filepath"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"

sechubUtil "daimler.com/sechub/util"
sechubUtil "mercedes-benz.com/sechub/util"
)

// SecHubConfig is the sechub configuration JSON pendant in Go. But we do only necessary parts from JSON file!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"

. "daimler.com/sechub/testutil"
. "mercedes-benz.com/sechub/testutil"
)

func Test_fillTemplate_without_data_keeps_data_as_is(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"testing"

sechubTestUtil "daimler.com/sechub/testutil"
sechubTestUtil "mercedes-benz.com/sechub/testutil"
)

// https://localhost:8443/api/project/testproject/job/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package main
* Main entry point for SECHUB CLI client.
*/
import (
"daimler.com/sechub/cli"
"mercedes-benz.com/sechub/cli"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

sechubTestUtil "daimler.com/sechub/testutil"
sechubTestUtil "mercedes-benz.com/sechub/testutil"
)

func TestCreateChecksum(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"testing"

sechubTestUtil "daimler.com/sechub/testutil"
sechubTestUtil "mercedes-benz.com/sechub/testutil"
)

func Example_readFromConsole() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package util
import (
"testing"

. "daimler.com/sechub/testutil"
. "mercedes-benz.com/sechub/testutil"
)

func Test_Simple_filename_and_pattern_with_asterisk_at_start_and_prefix_matches(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package util
import (
"testing"

. "daimler.com/sechub/testutil"
. "mercedes-benz.com/sechub/testutil"
)

func Test_emptyJSON_is_json(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

sechubUtil "daimler.com/sechub/testutil"
sechubUtil "mercedes-benz.com/sechub/testutil"
)

func TestZipFileBeingPartOfScannedFoldersIsRejected(t *testing.T) {
Expand Down