Skip to content

Github Action Doesnt Work #469

Closed
Closed
@dcaponi

Description

@dcaponi

Summary

Adding gosec to a github action per the recommendation in the readme does not work.

Steps to reproduce the behavior

on: [push, pull_request]
name: Test
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.13.x, 1.14.x]
        platform: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.platform }}
    env:
      GO111MODULE: on
    steps:
    - name: Install Go
      uses: actions/setup-go@v1
      with:
        go-version: ${{ matrix.go-version }}
    - name: Checkout code
      uses: actions/checkout@v2
    - name: Format It!
      run: go fmt ./...
    - name: Vet It!
      run: go vet ./...
    - name: Secure It!
      uses: securego/gosec@master
      with:
        args: ./...
    - name: Test
      run: go test ./...

Add the github action above to a Go program.
Trigger the action

gosec version

2.2.0

Go version (output of 'go version')

1.13 / 1.14

Operating system / Environment

ubuntu, windows, macos

Expected behavior

gosec runs and shows me security flaws

Actual behavior

Run securego/gosec@master
/usr/bin/docker run --name securegogosec_fea4c0 --label c27d31 --workdir /github/workspace --rm -e GO111MODULE -e GOROOT -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/onelogin-go-sdk/onelogin-go-sdk":"/github/workspace" securego/gosec  "./..."
[gosec] 2020/04/29 23:19:42 Including rules: default
[gosec] 2020/04/29 23:19:42 Excluding rules: default
[gosec] 2020/04/29 23:19:42 Import directory: /github/workspace/pkg/oltypes
[gosec] 2020/04/29 23:19:42 Import directory: /github/workspace/internal/customerrors
[gosec] 2020/04/29 23:19:42 Import directory: /github/workspace/internal/services
[gosec] 2020/04/29 23:19:42 Import directory: /github/workspace/pkg/client
[gosec] 2020/04/29 23:19:42 Import directory: /github/workspace/pkg/models
Results:

Golang errors in file: [internal/customerrors]:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions