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

Configure a non-root user #5658

Open
1 task done
jasonkarns opened this issue May 17, 2024 · 1 comment
Open
1 task done

Configure a non-root user #5658

jasonkarns opened this issue May 17, 2024 · 1 comment
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label

Comments

@jasonkarns
Copy link

jasonkarns commented May 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Trying to redirect the log file output to GitHub Job Summaries.

      - uses: github/super-linter/slim@v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CREATE_LOG_FILE: true
          # /snip
      - if: always()
        run: cat super-linter.log >> $GITHUB_STEP_SUMMARY

But catting the logfile gives a permissions error.

Expected Behavior

I'd expect subsequent steps to have access to the log file that is created.

Super-Linter version

slim-v6.4.1

Relevant log output

Run cat super-linter.log >> $GITHUB_STEP_SUMMARY
  cat super-linter.log >> $GITHUB_STEP_SUMMARY
  shell: /usr/bin/bash -e {0}
cat: super-linter.log: Permission denied
Error: Process completed with exit code 1.

Steps To Reproduce

on github actions
run while creating log file
attempt to read log file after step is complete

Anything else?

full job run: https://github.com/jasonkarns/bats-mock/actions/runs/9129703172/job/25104872145

@ferrarimarco
Copy link
Collaborator

Hi @jasonkarns ! This is currently expected and not a bug because we don't create a user within the container image.

This came up in the past (#1861), so it might be a valid request, also considering that is a recommended best practice.

Feel free to send a PR to implement this, we'll happily review it.

@ferrarimarco ferrarimarco added enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label and removed bug Something isn't working labels May 17, 2024
@ferrarimarco ferrarimarco changed the title logfile permissions are denied to subsequent steps Configure a non-root user May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label
Projects
None yet
Development

No branches or pull requests

2 participants