Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
37 changes: 21 additions & 16 deletions .github/workflows/strix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
strix_llm:
description: Optional Strix model override for manual evidence runs
required: false
default: openai/openai/gpt-4.1
default: openai/gpt-5
type: string

concurrency:
Expand Down Expand Up @@ -115,25 +115,27 @@ jobs:
- name: Gate Strix secrets
id: gate
env:
STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/openai/gpt-4.1' }}
STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/gpt-5' }}
STRIX_OPENAI_API_KEY: ${{ secrets.STRIX_OPENAI_API_KEY }}
STRIX_VERTEX_CREDENTIALS: ${{ secrets.GCP_SA_KEY }}
GITHUB_MODELS_TOKEN: ${{ github.token }}
STRIX_GITHUB_MODELS_TOKEN: ${{ secrets.STRIX_GITHUB_MODELS_TOKEN }}
run: |
strix_model="$(printf '%s' "$STRIX_MODEL" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
case "$strix_model" in
openai/openai/*)
openai/gpt-5* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]* | \
openai/openai/gpt-5* | openai/openai/gpt-[6-9]* | openai/openai/gpt-[1-9][0-9]* | \
github_models/*)
echo 'enabled=true' >> "$GITHUB_OUTPUT"
echo 'provider_mode=github_models' >> "$GITHUB_OUTPUT"
sanitized_github_models_token="$(printf '%s' "$GITHUB_MODELS_TOKEN" | tr -d '\r\n')"
sanitized_github_models_token="$(printf '%s' "$STRIX_GITHUB_MODELS_TOKEN" | tr -d '\r\n')"
trimmed_github_models_token="$(printf '%s' "$sanitized_github_models_token" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
if [ -z "$trimmed_github_models_token" ]; then
echo '::error::github.token is required for GitHub Models Strix scans.'
echo '::error::STRIX_GITHUB_MODELS_TOKEN is required for GitHub Models Strix scans.'
exit 1
fi
;;
gpt-5.[4-9]* | gpt-5.[1-9][0-9]* | gpt-[6-9]* | gpt-[1-9][0-9]* | \
openai/gpt-5.[4-9]* | openai/gpt-5.[1-9][0-9]* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]*)
openai-direct/gpt-5.[4-9]* | openai-direct/gpt-5.[1-9][0-9]* | openai-direct/gpt-[6-9]* | openai-direct/gpt-[1-9][0-9]*)
echo 'enabled=true' >> "$GITHUB_OUTPUT"
echo 'provider_mode=openai_direct' >> "$GITHUB_OUTPUT"
sanitized_openai_key="$(printf '%s' "$STRIX_OPENAI_API_KEY" | tr -d '\r\n')"
Expand All @@ -154,7 +156,7 @@ jobs:
fi
;;
*)
echo '::error::STRIX_LLM must select GitHub Models openai/openai/*, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.'
echo '::error::STRIX_LLM must select GitHub Models openai/gpt-5 or newer, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.'
exit 1
;;
esac
Expand All @@ -169,7 +171,7 @@ jobs:
- name: Mask LLM API key
if: steps.gate.outputs.enabled == 'true'
env:
LLM_API_KEY: ${{ steps.gate.outputs.provider_mode == 'github_models' && github.token || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }}
LLM_API_KEY: ${{ steps.gate.outputs.provider_mode == 'github_models' && secrets.STRIX_GITHUB_MODELS_TOKEN || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }}
run: |
# Sanitize CR/LF before masking to prevent broken ::add-mask::
# commands and potential workflow command injection.
Expand All @@ -185,13 +187,13 @@ jobs:
- name: Prepare LLM API key input file
if: steps.gate.outputs.enabled == 'true'
env:
LLM_API_KEY_SECRET: ${{ steps.gate.outputs.provider_mode == 'github_models' && github.token || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }}
LLM_API_KEY_SECRET: ${{ steps.gate.outputs.provider_mode == 'github_models' && secrets.STRIX_GITHUB_MODELS_TOKEN || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }}
PROVIDER_MODE: ${{ steps.gate.outputs.provider_mode }}
run: |
sanitized="$(printf '%s' "$LLM_API_KEY_SECRET" | tr -d '\r\n')"
trimmed="$(printf '%s' "$sanitized" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
if [ -z "$trimmed" ] && [ "$PROVIDER_MODE" = "github_models" ]; then
echo '::error::github.token is required for GitHub Models Strix scans.'
echo '::error::STRIX_GITHUB_MODELS_TOKEN is required for GitHub Models Strix scans.'
exit 1
fi
if [ -z "$trimmed" ] && [ "$PROVIDER_MODE" = "openai_direct" ]; then
Expand Down Expand Up @@ -242,17 +244,19 @@ jobs:
- name: Prepare Strix model input file
if: steps.gate.outputs.enabled == 'true'
env:
STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/openai/gpt-4.1' }}
STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/gpt-5' }}
run: |
umask 077
strix_llm_file="$RUNNER_TEMP/strix_llm.txt"
strix_model="$(printf '%s' "$STRIX_MODEL" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
case "$strix_model" in
openai/openai/*)
openai/gpt-5* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]* | \
openai/openai/gpt-5* | openai/openai/gpt-[6-9]* | openai/openai/gpt-[1-9][0-9]* | \
github_models/*)
printf '%s' "$strix_model" > "$strix_llm_file"
;;
openai/*)
printf '%s' "$strix_model" > "$strix_llm_file"
openai-direct/gpt-*)
printf 'openai/%s' "${strix_model#openai-direct/}" > "$strix_llm_file"
;;
gpt-*)
printf 'openai/%s' "$strix_model" > "$strix_llm_file"
Expand All @@ -261,7 +265,7 @@ jobs:
printf '%s' "$strix_model" > "$strix_llm_file"
;;
*)
echo '::error::STRIX_LLM must select GitHub Models openai/openai/*, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.'
echo '::error::STRIX_LLM must select GitHub Models openai/gpt-5 or newer, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.'
exit 1
;;
esac
Expand Down Expand Up @@ -296,6 +300,7 @@ jobs:
STRIX_LLM_MAX_RETRIES: 1
STRIX_TRANSIENT_RETRY_PER_MODEL: 2
STRIX_TRANSIENT_RETRY_BACKOFF_SECONDS: 3
STRIX_FALLBACK_MODELS: ${{ steps.gate.outputs.provider_mode == 'github_models' && 'openai/gpt-5-mini openai/gpt-5-nano' || '' }}
STRIX_FAIL_ON_PROVIDER_SIGNAL: "1"
STRIX_VERTEX_FALLBACK_MODELS: ""
NPM_CONFIG_IGNORE_SCRIPTS: "true"
Expand Down
15 changes: 8 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
single files if that makes real repo modules look missing.
- Prefer upgrading or removing vulnerable dependencies over downgrading patched
packages unless compatibility evidence is recorded in the PR.
- Strix Security Scan uses GitHub Models by default through `github.token`,
`models: read`, `STRIX_LLM=openai/openai/gpt-4.1`, and
- Strix Security Scan uses GitHub Models by default through
`STRIX_GITHUB_MODELS_TOKEN`, `STRIX_LLM=openai/gpt-5`, and
`LLM_API_BASE_FILE` pointing at a trusted file containing
`https://models.github.ai/inference`. Keep the GitHub Models endpoint in a
trusted input file and pass the token only through the
provider-scoped Strix child-process key path. Legacy `STRIX_LLM` secrets must
not override PR, push, or scheduled Strix defaults. Vertex remains available
only for manual `workflow_dispatch` evidence when the `strix_llm` input
`https://models.github.ai/inference`; GitHub Models fallbacks use
`openai/gpt-5-mini` and `openai/gpt-5-nano`. Keep the GitHub Models endpoint
in a trusted input file and pass the token only through the provider-scoped
Strix child-process key path. Legacy `STRIX_LLM` secrets must not override PR,
push, or scheduled Strix defaults. Vertex remains available only for manual
`workflow_dispatch` evidence when the `strix_llm` input
explicitly selects `vertex_ai/gemini-3.1-pro-preview-customtools` or
`vertex_ai/gemini-2.5-flash` with `GCP_SA_KEY`; expose Google/Vertex
credentials only for Vertex provider mode. Direct OpenAI GPT-5.4-or-newer
Expand Down
4 changes: 2 additions & 2 deletions backend/tests/test_ai_hub_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ async def scoped_db():
def test_ai_hub_surface_uses_signed_source_evidence():
session = MockSession()
session.prompts = [
_prompt(1, "의사결정 로그 요약"),
_prompt(1, "의사결정 로그 맥락 종합"),
_prompt(2, "공유 프롬프트", owner_id="other-user"),
]
session.prompts[1].is_shared = True
Expand All @@ -216,7 +216,7 @@ def test_ai_hub_surface_uses_signed_source_evidence():
assert response.status_code == 200
data = response.json()
assert data["summary_cards"][0]["value_text"] == "1"
assert data["prompt_cards"][0]["prompt_title"] == "의사결정 로그 요약"
assert data["prompt_cards"][0]["prompt_title"] == "의사결정 로그 맥락 종합"
assert all(card["owner_label"] == "alice" for card in data["prompt_cards"])
assert data["prompt_cards"][0]["prompt_key"].startswith("prompt_")
assert "id" not in data["prompt_cards"][0]
Expand Down
6 changes: 4 additions & 2 deletions backend/tests/test_release_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,13 @@ def test_strix_workflow_uses_github_models_default_and_narrow_warning_filter() -
assert "models: read" in workflow
assert "provider_mode=github_models" in workflow
assert "strix_llm:" in workflow
assert "github.event.inputs.strix_llm || 'openai/openai/gpt-4.1'" in workflow
assert "github.event.inputs.strix_llm || 'openai/gpt-5'" in workflow
assert "secrets.STRIX_LLM ||" not in workflow
assert "https://models.github.ai/inference" in workflow
assert "LLM_API_BASE_FILE" in workflow
assert "github.token is required for GitHub Models Strix scans" in workflow
assert "STRIX_GITHUB_MODELS_TOKEN is required for GitHub Models Strix scans" in workflow
assert "secrets.STRIX_GITHUB_MODELS_TOKEN" in workflow
assert "openai/gpt-5-mini openai/gpt-5-nano" in workflow
assert "vertex_ai/gemini-3.1-pro-preview-customtools" in workflow
assert (
"secrets.STRIX_LLM == 'vertex_ai/gemini-3.1-pro-preview-customtools' "
Expand Down
17 changes: 9 additions & 8 deletions docs/plans/2026-05-27-strix-openai-direct-only.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

Keep the required Strix security gate on, but make the provider contract
unambiguous. The active default route is GitHub Models selected through
`STRIX_LLM=openai/openai/gpt-4.1`, `models: read`, `github.token`, and
`STRIX_LLM=openai/gpt-5`, `STRIX_GITHUB_MODELS_TOKEN`, and
`LLM_API_BASE_FILE` pointing at a trusted file containing
`https://models.github.ai/inference`. Legacy `STRIX_LLM` secrets must not
override PR, push, or scheduled Strix defaults. Vertex AI remains available only
for manual `workflow_dispatch` evidence when `strix_llm`
explicitly selects an approved Vertex model with `GCP_SA_KEY`, and direct OpenAI
GPT-5.4-or-newer remains allowed only for manual `strix_llm` selections with
`https://models.github.ai/inference`; GitHub Models fallbacks use
`openai/gpt-5-mini` and `openai/gpt-5-nano`. Legacy `STRIX_LLM` secrets must
not override PR, push, or scheduled Strix defaults. Vertex AI remains available
only for manual `workflow_dispatch` evidence when `strix_llm` explicitly selects
an approved Vertex model with `GCP_SA_KEY`, and direct OpenAI GPT-5.4-or-newer
remains allowed only for manual `strix_llm` selections with
`STRIX_OPENAI_API_KEY`. Strix must not route through a generic `LLM_API_KEY` or
silently fall back across providers.

Expand All @@ -30,8 +31,8 @@ silently fall back across providers.
## Implementation

- Keep GitHub Models credential handling inside `provider_mode=github_models`
with `github.token` passed through the trusted child-process key file and
`LLM_API_BASE_FILE` pointing at a trusted temp file.
with `STRIX_GITHUB_MODELS_TOKEN` passed through the trusted child-process key
file and `LLM_API_BASE_FILE` pointing at a trusted temp file.
- Keep GCP credential gating, Google Cloud authentication, and credential export
only inside manual `provider_mode=vertex_ai`, and only for approved Vertex
model names.
Expand Down
5 changes: 3 additions & 2 deletions docs/plans/2026-05-29-strix-full-scan-operational-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
## Plan

1. Keep the GitHub Models default route with
`STRIX_LLM=openai/openai/gpt-4.1`, `models: read`, `github.token`, and
`STRIX_LLM=openai/gpt-5`, `STRIX_GITHUB_MODELS_TOKEN`, and
`LLM_API_BASE_FILE` pointing at a trusted file containing
`https://models.github.ai/inference`.
`https://models.github.ai/inference`, with GitHub Models fallbacks
`openai/gpt-5-mini` and `openai/gpt-5-nano`.
2. Keep legacy `STRIX_LLM` secrets from overriding PR, push, or scheduled
defaults. Keep Vertex routes explicit through manual `workflow_dispatch`
`strix_llm` selections plus `GCP_SA_KEY`, and keep direct OpenAI explicit
Expand Down
7 changes: 4 additions & 3 deletions docs/plans/2026-05-29-strix-vertex-model-warning-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
- Project policy treats `Timeout`, `Fatal`, `Warn`, and `Denied` output as
failure evidence even when the GitHub job conclusion is success.
- The active default route is GitHub Models via
`STRIX_LLM=openai/openai/gpt-4.1`, `models: read`, `github.token`, and
`STRIX_LLM=openai/gpt-5`, `STRIX_GITHUB_MODELS_TOKEN`, and
`LLM_API_BASE_FILE` pointing at a trusted file containing
`https://models.github.ai/inference`. Explicit Vertex routes still require
organization `GCP_SA_KEY` credentials.
`https://models.github.ai/inference`; GitHub Models fallbacks use
`openai/gpt-5-mini` and `openai/gpt-5-nano`. Explicit Vertex routes still
require organization `GCP_SA_KEY` credentials.

## Plan

Expand Down
9 changes: 7 additions & 2 deletions frontend/src/app/ai-hub/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ describe('AIHubPage', () => {
}
expect(container.textContent).toContain('AI 허브');
expect(container.textContent).toContain('의사결정 로그 맥락 종합');
expect(container.querySelector('nav[aria-label="AI hub execution checkpoints"]')?.textContent).toContain('맥락 종합');
expect(container.querySelector('section[aria-labelledby="context-title"]')?.textContent).toContain('맥락 종합');
expect(container.querySelector('section[aria-labelledby="decisions-title"]')?.textContent).toContain('판단 포인트');
expect(container.querySelector('section[aria-labelledby="actions-title"]')?.textContent).toContain('실행 항목');
expect(container.textContent).not.toContain('설명 없음');

clickButton(container, '워크플로우');
expect(container.textContent).toContain('의사결정 로그 맥락 종합 실행 흐름');
Expand Down Expand Up @@ -199,7 +204,7 @@ describe('AIHubPage', () => {
root?.render(<AIHubPage />);
});

expect(container.textContent).toContain('AI Hub source evidence를 불러오는 중입니다.');
expect(container.textContent).toContain('AI 허브 source evidence를 불러오는 중입니다.');

await act(async () => {
resolveFetch(jsonResponse(aiHubSurface));
Expand All @@ -220,7 +225,7 @@ describe('AIHubPage', () => {
await flushAsyncWork();

expect(container.querySelector('[role="alert"]')?.textContent).toContain(
'AI Hub source evidence를 불러오지 못했습니다.',
'AI 허브 source evidence를 불러오지 못했습니다.',
);
expect(container.textContent).toContain('다시 시도');
expect(consoleError).toHaveBeenCalled();
Expand Down
Loading