Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/audit-central-ruleset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
persist-credentials: false

- name: Read live inherited organization ruleset and repository scope
- name: Read live inherited organization ruleset and public scope
env:
ORG_LOGIN: ContextualWisdomLab
RULESET_ID: "18156473"
Expand All @@ -46,7 +46,7 @@ jobs:
ruleset_json="$RUNNER_TEMP/central-required-workflow-ruleset.json"
ruleset_with_scope_json="$RUNNER_TEMP/central-required-workflow-ruleset-with-scope.json"
ruleset_error="$RUNNER_TEMP/central-required-workflow-ruleset.error"
repositories_json="$RUNNER_TEMP/central-required-workflow-organization-repositories.json"
repositories_json="$RUNNER_TEMP/central-required-workflow-public-repositories.json"
scope_json="$RUNNER_TEMP/central-required-workflow-scope.json"
ruleset_endpoint="repos/${ORG_LOGIN}/${RULESET_SENTINEL_REPOSITORY}/rulesets/${RULESET_ID}?includes_parents=true"

Expand All @@ -55,9 +55,9 @@ jobs:
sed 's/^/ /' "$ruleset_error"
exit 1
fi
if ! gh api --paginate "orgs/${ORG_LOGIN}/repos?type=all&per_page=100" \
if ! gh api --paginate "orgs/${ORG_LOGIN}/repos?type=public&per_page=100" \
| jq -s 'add | map(.name) | unique | sort' >"$repositories_json"; then
echo "::error::Ruleset audit could not enumerate organization repositories for ${ORG_LOGIN}."
echo "::error::Ruleset audit could not enumerate public repositories for ${ORG_LOGIN}."
Comment on lines +58 to +60

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐ŸŽฏ Functional Correctness | ๐ŸŸ  Major | ๐Ÿ—๏ธ Heavy lift

์ €์žฅ์†Œ ์—ด๊ฑฐ ๋ฒ”์œ„๋ฅผ public์œผ๋กœ ์ขํžŒ ํ•˜๋‚˜์˜ ๋ณ€๊ฒฝ์ด ๊ฐ์‚ฌ ๊ฒ€์ฆ๊ณผ ํ…Œ์ŠคํŠธ fixture ๋ชจ๋‘์™€ ์ถฉ๋Œํ•ฉ๋‹ˆ๋‹ค. ๊ฐ์‚ฌ ์›Œํฌํ”Œ๋กœ๋Š” ์ด์ œ ๊ณต๊ฐœ ์ €์žฅ์†Œ๋งŒ ํ”„๋กœ๋ธŒํ•˜์ง€๋งŒ, ๊ฐ์‚ฌ ์Šคํฌ๋ฆฝํŠธ๋Š” ๋ชจ๋“  ์ œ์™ธ ์ €์žฅ์†Œ์˜ ํ”„๋กœ๋ธŒ ์กด์žฌ๋ฅผ ์š”๊ตฌํ•˜๊ณ  ํ…Œ์ŠคํŠธ fixture๋Š” private ์ €์žฅ์†Œ๋ฅผ ์ƒ์† ๋Œ€์ƒ์œผ๋กœ ์œ ์ง€ํ•ฉ๋‹ˆ๋‹ค.

  • .github/workflows/audit-central-ruleset.yml#L58-L60: ์ œ์™ธ ์ €์žฅ์†Œ(.github, argos, noema)๋ฅผ ์—ด๊ฑฐ ๊ฒฐ๊ณผ์™€ ๋ฌด๊ด€ํ•˜๊ฒŒ ํ•ญ์ƒ ํ”„๋กœ๋ธŒํ•˜๋„๋ก ์ˆ˜์ •ํ•˜์‹ญ์‹œ์˜ค. private ์ €์žฅ์†Œ๋„ ๊ฐ์‚ฌ ๋Œ€์ƒ์ด๋ฉด type=all์„ ์œ ์ง€ํ•˜๊ณ  ์ ‘๊ทผ ๋ถˆ๊ฐ€ ์ €์žฅ์†Œ๋งŒ ๋ช…์‹œ์ ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ์‹ญ์‹œ์˜ค.
  • scripts/ci/audit_central_required_workflows.py#L75-L80: ์—ด๊ฑฐ ๋ฒ”์œ„์— ํฌํ•จ๋˜์ง€ ์•Š๋Š” ์ œ์™ธ ์ €์žฅ์†Œ๋ฅผ ํ•„์ˆ˜ ํ”„๋กœ๋ธŒ ๋Œ€์ƒ์—์„œ ์ œ๊ฑฐํ•˜๊ฑฐ๋‚˜, ์›Œํฌํ”Œ๋กœ๊ฐ€ ํ•ญ์ƒ ํ”„๋กœ๋ธŒํ•จ์„ ์ „์ œ๋กœ ๋ฌธ์„œํ™”ํ•˜์‹ญ์‹œ์˜ค.
  • tests/test_central_required_workflow_ruleset_audit.py#L65-L78: inherited_ruleset_payload์˜ ํ”„๋กœ๋ธŒ ์ง‘ํ•ฉ์„ ์ตœ์ข… ์—ด๊ฑฐ ๋ฒ”์œ„์™€ ์ผ์น˜์‹œํ‚ค์‹ญ์‹œ์˜ค.
๐Ÿ“ Affects 3 files
  • .github/workflows/audit-central-ruleset.yml#L58-L60 (this comment)
  • scripts/ci/audit_central_required_workflows.py#L75-L80
  • tests/test_central_required_workflow_ruleset_audit.py#L65-L78
๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/audit-central-ruleset.yml around lines 58 - 60, Align
repository enumeration and probe expectations across
.github/workflows/audit-central-ruleset.yml lines 58-60,
scripts/ci/audit_central_required_workflows.py lines 75-80, and
tests/test_central_required_workflow_ruleset_audit.py lines 65-78: keep private
repositories in the audit scope with type=all and explicitly skip only
inaccessible repositories, ensure excluded repositories are not required as
probes when outside the enumerated scope or document the workflowโ€™s
unconditional probing behavior, and update inherited_ruleset_payload to match
the final enumerated probe set.

exit 1
fi

Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/noema-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,6 @@ jobs:
echo "::add-mask::$app_token"
echo "token=$app_token" >>"$GITHUB_OUTPUT"

- name: Resolve Noema target repository visibility
if: env.PR_NUMBER != ''
id: target_visibility
env:
GH_TOKEN: ${{ secrets.NOEMA_REVIEW_TOKEN || steps.noema_github_app_token.outputs.token || steps.noema_oidc_token.outputs.token }}
run: |
set -euo pipefail
is_private="$(gh api "repos/${TARGET_REPOSITORY}" --jq '.private')"
case "$is_private" in
true | false) ;;
*)
echo "::error::Noema target repository visibility did not resolve to true or false."
exit 1
;;
esac
echo "is_private=$is_private" >>"$GITHUB_OUTPUT"

- name: Run Noema LLM review and submit verdict
if: env.PR_NUMBER != ''
env:
Expand All @@ -275,8 +258,6 @@ jobs:
NOEMA_LLM_API_URL: ${{ vars.NOEMA_LLM_API_URL || '' }}
NOEMA_LLM_MODEL: ${{ vars.NOEMA_LLM_MODEL || '' }}
NOEMA_LLM_API_KEY: ${{ secrets.NOEMA_LLM_API_KEY || secrets.OPENAI_API_KEY || '' }}
NVIDIA_NIM_API_KEY: ${{ secrets.NVIDIA_NIM_API_KEY }}
TARGET_REPOSITORY_PRIVATE: ${{ steps.target_visibility.outputs.is_private }}
run: |
set -euo pipefail
if [ -z "${PR_NUMBER:-}" ]; then
Expand All @@ -287,11 +268,6 @@ jobs:
echo "::error::Noema reviewer credential selection succeeded but no token was minted; review cannot submit a verdict."
exit 1
fi
if [ "$TARGET_REPOSITORY_PRIVATE" = "false" ] && [ -n "${NVIDIA_NIM_API_KEY:-}" ] && [ -z "${NOEMA_LLM_API_URL:-}" ] && [ -z "${NOEMA_LLM_MODEL:-}" ]; then
export NOEMA_LLM_API_URL="https://integrate.api.nvidia.com/v1/chat/completions"
export NOEMA_LLM_MODEL="nvidia/nemotron-3-ultra-550b-a55b"
export NOEMA_LLM_API_KEY="${NVIDIA_NIM_API_KEY:-}"
fi
if [ -z "${NOEMA_LLM_API_URL:-}" ] || [ -z "${NOEMA_LLM_MODEL:-}" ] || [ -z "${NOEMA_LLM_API_KEY:-}" ]; then
echo "::error::Noema LLM is unconfigured: NOEMA_LLM_API_URL, NOEMA_LLM_MODEL, and NOEMA_LLM_API_KEY (or OPENAI_API_KEY) are required."
exit 1
Expand Down
Loading
Loading