Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

How do I use JFrog OIDC credentials to run a container in another job?

オープン
#361 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github-actions, typescript

調査の方向性

Start by reading src/oidc-utils.ts around the core.setSecret calls identified in the issue, and trace how the OIDC username and token become action outputs. Consider the interaction between secret masking and GitHub Actions job outputs before proposing a change. Done means the credentials can be passed to another job as described without compromising their handling.

索引モデルが issue の本文から書いたものです。

説明

bug
Describe the bug

Currently, it's not possible to obtain OIDC credentials and then use them to run code on a different container

Mainly because {{ steps.jfrog.outputs.oidc-user }} and {{ steps.jfrog.outputs.oidc-password }} are marked as secrets using
https://github.com/jfrog/setup-jfrog-cli/blob/v5.3.0/src/oidc-utils.ts#L159

        core.setSecret(accessToken);
        core.setSecret(username);

by forking the repo and removing this lines, I was successfully able to do this:

name: Run a Container Hosted In Jfrog
run-name: Run a Container Hosted In Jfrog

permissions:
  contents: read
  id-token: write

on:
    workflow_dispatch:

jobs:
  jfrog_auth:
    name: "JFrog Authentication"
    runs-on: default
    outputs:
      jfrog_username: ${{ steps.jfrog.outputs.oidc-user }}
      jfrog_password: ${{ steps.jfrog.outputs.oidc-token }}

    steps:
      - name: Setup JFrog CLI (OIDC)
        id: jfrog
        uses: jfrog/setup-jfrog-cli@v5
        with:
          oidc-provider-name: MY_OIDC_PROVIDER_NAME
          oidc-audience: MY_OIDC_AUDIENCE
        env:
          JF_URL: https://MYORG.jfrog.io


  next_gen_web:
    runs-on: default
    needs: jfrog_auth
    container:
      image: MYORG.jfrog.io/MY_PATH/MY_CONTAINER:latest
      credentials:
        username: "${{ needs.jfrog_auth.outputs.jfrog_username }}"
        password: "${{ needs.jfrog_auth.outputs.jfrog_password }}"
    steps:
      - run: |
          echo "This is running from inside of MYORG.jfrog.io/MY_PATH/MY_CONTAINER:latest" 

Current behavior

oidc-user and oidc-password can not be transmitted between jobs

Reproduction steps

the code above

Expected behavior

the code above should work

Setup JFrog CLI version

jfrog/setup-jfrog-cli@v5

JFrog CLI version

none

Workflow operating system type and version

github actions

JFrog Artifactory version (if relevant)

No response

JFrog Xray version (if relevant)

No response

主要言語
TypeScript
スター
267
フォーク
114
平均マージ
10分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jfrog/setup-jfrog-cli のほかの issue

jfrog/setup-jfrog-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。