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

Nova jobs couldn't get secrets from the caller's environment #5550

Open
huydhn opened this issue Aug 13, 2024 · 1 comment
Open

Nova jobs couldn't get secrets from the caller's environment #5550

huydhn opened this issue Aug 13, 2024 · 1 comment
Labels
Nova Tooling Tooling Related to Project Nova (CI Tooling) security

Comments

@huydhn
Copy link
Contributor

huydhn commented Aug 13, 2024

GitHub secrets can be accessible from an environment (best practice) or be available repo-wide. The latter is not secure with self-hosted runners as we have learnt in the past. However, AFAICT, trying to pass secrets from the caller's environment to Nova jobs is not possible atm as there is no way to set the environment variable with Nova.

Here is what I try to do (and fail):

  • Create an environment called test-passing-secrets with main branch protection and a dummy secret, let's say FOOBAR
  • Try to pass FOOBAR to a Linux Nova job
jobs:
  test-passing-secrets-not-working:
    uses: ./.github/workflows/linux_job.yml
    environment: test-passing-secrets <--- invalid GH syntax
    secrets: inherit
    with:
      runner: linux.2xlarge
      script: |
        # Try to access SECRET_FOOBAR here

This limits the usefulness of Nova jobs, for example it cannot be use to access HuggingFace, upload to pypi or conda where secret tokens are needed.

This is more like an issue with the way GitHub handle reusable workflows where it currently doesn't allow environment to be set. However, maybe there is a workaround that folks know.

cc @seemethere @ZainRizvi

Ref

https://docs.github.com/en/actions/sharing-automations/reusing-workflows#supported-keywords-for-jobs-that-call-a-reusable-workflow

@clee2000 clee2000 added Nova Tooling Tooling Related to Project Nova (CI Tooling) security labels Aug 20, 2024
@clee2000
Copy link
Contributor

Notes: this isn't specific to NOVA, it's all reusable actions. We should bring this up to GH during the next meeting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nova Tooling Tooling Related to Project Nova (CI Tooling) security
Projects
Status: Cold Storage
Development

No branches or pull requests

2 participants