Skip to content

Sudo error if job runs in container #23

@Th3S4mur41

Description

@Th3S4mur41

We have multiple jobs running in docker containers like node.

jobs:
  myJob:
    runs-on: [self-hosted, linux]
    container: node:lts-bullseye

    steps:
      - uses: GitHubSecurityLab/actions-permissions/monitor@v1
        with:
          config: ${{ vars.PERMISSIONS_CONFIG }}
      - ...

Adding the monitor as a first step to those jobs throws the following error.

Run GitHubSecurityLab/actions-permissions/monitor@v1
  with:
    token: ***
    debug: false
/usr/bin/docker exec  9bc858ec98d1[2](https://github.com/eviden-parallel/actions/actions/runs/6001487624/job/16275802651#step:3:2)90fa22a[3](https://github.com/eviden-parallel/actions/actions/runs/6001487624/job/16275802651#step:3:3)8b13c69d[5](https://github.com/eviden-parallel/actions/actions/runs/6001487624/job/16275802651#step:3:6)9dbdeb5[6](https://github.com/eviden-parallel/actions/actions/runs/6001487624/job/16275802651#step:3:7)c3f1ed58001ab956a[7](https://github.com/eviden-parallel/actions/actions/runs/6001487624/job/16275802651#step:3:8)1c2913ab sh -c "cat /etc/*release | grep ^ID"
setup.sh: line 75: sudo: command not found

Error: Exited with code 127

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