From 2e1826f8db0f5a1c29ee6a4ca6e7369f00c41c0d Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Sat, 14 Oct 2023 00:42:42 -0700 Subject: [PATCH 01/13] Update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 03882f2..423cbcf 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/99designs/keyring v1.2.2 github.com/go-ble/ble v0.0.0-20220207185428-60d1eecf2633 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 - golang.org/x/term v0.5.0 + golang.org/x/term v0.12.0 google.golang.org/protobuf v1.28.1 ) From e7c50eedd28bba908c7f7f1020c6e7da94a39bd5 Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:23:13 -0700 Subject: [PATCH 02/13] Create go.yml --- .github/workflows/go.yml | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..d31d569 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,83 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + + - name: Check Auto + run: | + export GOPATH=`go env GOPATH` && + export PATH="$GOPATH/bin:$PATH" && go install github.com/relaxnow/vcgopkg@latest + vcgopkg + - name: Veracode Upload And Scan + # You may pin to the exact commit or the version. + uses: veracode/veracode-uploadandscan-action@98e2a2941b985e55bfe469ebcb970b2e686625e4 + # uses: veracode/veracode-uploadandscan-action@0.2.6 + with: # appname + appname: Go-example # default is ${{ github.repository }} + # createprofile + createprofile: true # default is true + # filepath + filepath: ./veracode/*.zip + # version + version: ${{ github.run_id }}-${{ github.run_number }} # default is Scan from Github job: ${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} + # vid + vid: ${{ secrets.VERACODE_API_ID }} + # vkey + vkey: ${{ secrets.VERACODE_API_KEY }} + # true or false + # createsandbox: # optional + # name of the sandbox + # sandboxname: # optional + # wait X minutes for the scan to complete + # scantimeout: # optional + # modules to exclude from module selection + # exclude: # optional + # modules to include in module selection + # include: # optional + # business criticality - policy selection + # criticality: # optional + # filename pattern + # pattern: # optional + # # # replacement + # replacement: # optional + # # specify to scan in a sandbox + # sandboxid: # optional + # # All top level modules + # scanallnonfataltoplevelmodules: # optional + # # platform selected modules + # selected: # optional + # # selected modules like from previous scan + # selectedpreviously: # optional + # # teams + # teams: # optional + # # teams + # toplevel: # optional + # # automatically delete the current scan if there are any errors when uploading files or starting the scan + # deleteincompletescan: # optional + # # Interval, in seconds, to poll for the status of a running scan. Value range is 30 to 120 (two minutes). Default is 120. + # scanpollinginterval: # optional + # # specify version of the Java API Wrapper; default is latest + # javawrapperversion: # optional + # # show detailed diagnostic information, which you can use for debugging, in the output. + # debug: # optional + # # automatically select all new top-level modules for inclusion in the scan + # includenewmodules: # optional From d566d6e4871b0312b9a8913a86df72c7ea37210a Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:24:28 -0700 Subject: [PATCH 03/13] Update go.yml --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d31d569..4763062 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,13 +26,13 @@ jobs: run: | export GOPATH=`go env GOPATH` && export PATH="$GOPATH/bin:$PATH" && go install github.com/relaxnow/vcgopkg@latest - vcgopkg + vcgopkg . - name: Veracode Upload And Scan # You may pin to the exact commit or the version. uses: veracode/veracode-uploadandscan-action@98e2a2941b985e55bfe469ebcb970b2e686625e4 # uses: veracode/veracode-uploadandscan-action@0.2.6 with: # appname - appname: Go-example # default is ${{ github.repository }} + appname: Go-Tesla # default is ${{ github.repository }} # createprofile createprofile: true # default is true # filepath From 44ecb8c002879c62e39bdb616d2f8a7480c74eb6 Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:26:23 -0700 Subject: [PATCH 04/13] Update go.yml --- .github/workflows/go.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4763062..fdcb9ee 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,6 +22,11 @@ jobs: go-version: '1.20' + - name: Build + run: | + go mod init example.com/m/v2 && go mod tidy + go build . + - name: Check Auto run: | export GOPATH=`go env GOPATH` && From 397cdf3a783de833efb730dfa29dc1542b0d5de3 Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:34:25 -0700 Subject: [PATCH 05/13] Update go.yml --- .github/workflows/go.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fdcb9ee..c0846f3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,8 +24,9 @@ jobs: - name: Build run: | - go mod init example.com/m/v2 && go mod tidy - go build . + go mod init && go mod tidy + docker builder build github.com/teslamotors/vehicle-command + - name: Check Auto run: | From 5e5bd35c5e854014f43e5a5e22095a5ca92d3fe8 Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:35:19 -0700 Subject: [PATCH 06/13] Update go.yml --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c0846f3..d8ba1ff 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,7 +25,7 @@ jobs: - name: Build run: | go mod init && go mod tidy - docker builder build github.com/teslamotors/vehicle-command + # docker builder build github.com/teslamotors/vehicle-command - name: Check Auto From 25c7f4878a3feca1c877f2d39ca6ad03c53f1e65 Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:36:11 -0700 Subject: [PATCH 07/13] Update go.yml --- .github/workflows/go.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d8ba1ff..af76362 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,10 +22,10 @@ jobs: go-version: '1.20' - - name: Build - run: | - go mod init && go mod tidy - # docker builder build github.com/teslamotors/vehicle-command + # - name: Build + # run: | + # go mod init && go mod tidy + # # docker builder build github.com/teslamotors/vehicle-command - name: Check Auto From ddfbc2b11b1bbb6ce7a77ec653440c3a99266627 Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:37:54 -0700 Subject: [PATCH 08/13] Update go.yml --- .github/workflows/go.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index af76362..cc898cc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,9 +22,9 @@ jobs: go-version: '1.20' - # - name: Build - # run: | - # go mod init && go mod tidy + - name: Build + run: | + go mod download && go build # # docker builder build github.com/teslamotors/vehicle-command From 5bbd8c6905f138ada476ff291718a9447f0360fe Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:40:58 -0700 Subject: [PATCH 09/13] Update go.yml --- .github/workflows/go.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cc898cc..ed69371 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,17 +22,17 @@ jobs: go-version: '1.20' - - name: Build - run: | - go mod download && go build - # # docker builder build github.com/teslamotors/vehicle-command + # - name: Build + # run: | + # go mod download && go build + # # # docker builder build github.com/teslamotors/vehicle-command - name: Check Auto run: | export GOPATH=`go env GOPATH` && export PATH="$GOPATH/bin:$PATH" && go install github.com/relaxnow/vcgopkg@latest - vcgopkg . + vcgopkg ${{ github.repository }} - name: Veracode Upload And Scan # You may pin to the exact commit or the version. uses: veracode/veracode-uploadandscan-action@98e2a2941b985e55bfe469ebcb970b2e686625e4 From 0f631287ae6324ff096908dd3ec3b267fecad9ae Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:42:50 -0700 Subject: [PATCH 10/13] Update go.yml --- .github/workflows/go.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ed69371..8e8991b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -30,9 +30,10 @@ jobs: - name: Check Auto run: | + cd ${{ github.repository }} export GOPATH=`go env GOPATH` && export PATH="$GOPATH/bin:$PATH" && go install github.com/relaxnow/vcgopkg@latest - vcgopkg ${{ github.repository }} + vcgopkg . - name: Veracode Upload And Scan # You may pin to the exact commit or the version. uses: veracode/veracode-uploadandscan-action@98e2a2941b985e55bfe469ebcb970b2e686625e4 From 15c6f26598f9f4ba6e6360aaf3a1bec2b91ae84e Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:43:50 -0700 Subject: [PATCH 11/13] Update go.yml --- .github/workflows/go.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8e8991b..94c3a7b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -30,6 +30,8 @@ jobs: - name: Check Auto run: | + pwd + ls */** cd ${{ github.repository }} export GOPATH=`go env GOPATH` && export PATH="$GOPATH/bin:$PATH" && go install github.com/relaxnow/vcgopkg@latest From 2080184e79387dfe70c75181a1006a6c1896f523 Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:45:21 -0700 Subject: [PATCH 12/13] Update go.yml --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 94c3a7b..0b93493 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -35,7 +35,7 @@ jobs: cd ${{ github.repository }} export GOPATH=`go env GOPATH` && export PATH="$GOPATH/bin:$PATH" && go install github.com/relaxnow/vcgopkg@latest - vcgopkg . + vcgopkg cmd/tesla-*/main.go - name: Veracode Upload And Scan # You may pin to the exact commit or the version. uses: veracode/veracode-uploadandscan-action@98e2a2941b985e55bfe469ebcb970b2e686625e4 From 644adba01e47a8dcce4c946f4be766d37c5e06ce Mon Sep 17 00:00:00 2001 From: Jin Mok <102392728+mokkang@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:47:39 -0700 Subject: [PATCH 13/13] Update go.yml --- .github/workflows/go.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0b93493..f89b2b1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -35,7 +35,11 @@ jobs: cd ${{ github.repository }} export GOPATH=`go env GOPATH` && export PATH="$GOPATH/bin:$PATH" && go install github.com/relaxnow/vcgopkg@latest - vcgopkg cmd/tesla-*/main.go + vcgopkg ./cmd/tesla-auth-token/main.go + vcgopkg ./cmd/tesla-control/main.go + vcgopkg ./cmd/tesla-http-proxy/main.go + vcgopkg ./cmd/tesla-keygen/main.go + - name: Veracode Upload And Scan # You may pin to the exact commit or the version. uses: veracode/veracode-uploadandscan-action@98e2a2941b985e55bfe469ebcb970b2e686625e4