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

Nested action not pointing to github.com with --replace-ghe-action-with-github-com flag #2413

Open
this-oliver opened this issue Aug 2, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@this-oliver
Copy link

this-oliver commented Aug 2, 2024

Bug report info

act version:            0.2.61
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 20
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:
        /home/bob/.config/act/actrc:
                --platform ubuntu-latest=catthehacker/ubuntu:act-latest
                --platform ubuntu-22.04=catthehacker/ubuntu:act-22.04
                --platform ubuntu-20.04=catthehacker/ubuntu:act-20.04
                --platform ubuntu-18.04=catthehacker/ubuntu:act-18.04
                --platform arc=repo.artifactory.org.com/runner-image/releases/v1.1.4:v1.1.4
                --github-instance github.org.com
                --replace-ghe-action-with-github-com actions/checkout,actions/setup-node,advanced-security/spdx-dependency-submission-action
                --container-options "--group-add $(stat -c %g /var/run/docker.sock)"
Build info:
        Go version:            go1.20.14
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -trimpath:            true
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         e8856f0fb00fcdd16eef2325b845f55f5d346f51
                vcs.time:             2023-08-21T16:17:06Z
                vcs.modified:         true
Docker Engine:
        Engine version:        27.1.1
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Debian GNU/Linux 12 (bookworm)
        OS type:               linux
        OS version:            12
        OS arch:               x86_64
        OS kernel:             5.15.153.1-microsoft-standard-WSL2
        OS CPU:                20
        OS memory:             31934 MB
        Security options:
                name=seccomp,profile=builtin

Command used with act

gh act --container-options "--group-add $(stat -c %g /var/run/docker.sock)" --local-repository devsecops/action-security@v0=/home/bob/repos/action-scan-deps --job security

Describe issue

nektos/act does not point the nested action, advanced-security/spdx-dependency-submission-action, to github.com even though the --replace-ghe-action-with-github-com flag is set (in the actrc and directly in the command).

Context

I have a workflow that calls an action, devsecops/action-security@v0, which I am developing locally (--local-repository devsecops/action-security@v0=/home/bob/repos/action-scan-deps) which, in turn, calls a remote (github.com) action advanced-security/spdx-dependency-submission-action@v0.1.1 .

Since I work on a GitHub Enterprise Server, I have configured the GitHub instance (--github-instance github.org.com) and defined the actions that need to point to github.com instead of github.org.com (--replace-ghe-action-with-github-com actions/checkout,actions/setup-node,advanced-security/spdx-dependency-submission-action) in the actrc config file.

Relevant Log Output

act-output.txt

Link to GitHub repository

No response

Workflow content

name: CI

on:
  push:
    branches: main
  pull_request:
    branches: main

jobs:
  quality-analysis:
    runs-on: arc
    steps:
      - name: checkout code
        uses: actions/checkout@v4

      - uses: actions/setup-node@v3
        with:
          node-version: 18

      - name: Install dependencies
        run: npm install

      - name: Run unit tests
        run: npm test

  security:
    runs-on: arc
    steps:
      - name: checkout code
        uses: actions/checkout@v4

      - name: Scan for code/dependency vulnerabilities
        uses: devsecops/action-security@v0
        with:
          report: true

  deploy:
    needs: [quality-analysis, security]
    runs-on: arc
    steps:
      - name: checkout code
        uses: actions/checkout@v4

      - name: build
        run: echo "add build steps here"

      - name: deploy
        run: echo "add deploy steps here"

Relevant log output

Output exceeded max character limit (65536 characters) so I appended a txt file in the issue description.

Additional information

I am running my environment on a Windows Subsystem for Linux (WSL) which depends on the Docker Desktop running on the Windows host (not on the WSL).

@this-oliver this-oliver added the kind/bug Something isn't working label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant