-
Notifications
You must be signed in to change notification settings - Fork 1
Triage from dev #165
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
Merged
Merged
Triage from dev #165
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
667a3b9
feat(#135): dashboard tooltip nudges out-of-session committers to /bi…
jinhongkuan aebd94b
feat(#108): end-to-end sim + capture-corrections skill correction
jinhongkuan 78b6c09
style(#108): ruff format scripts/sim_issue_108_flows.py + docstring sync
jinhongkuan 6163002
fix(#108): portable repo-root resolution in sim_issue_108_flows.py
jinhongkuan ad3e440
chore: bump to v0.13.6 — triage release (#135, #108)
jinhongkuan aa74510
fix(skill): resolve preflight auto-fire failure on natural refactor p…
Knapp-Kevin c5c86f7
fix(setup): install preflight UserPromptSubmit hook for end users
jinhongkuan d014299
style: ruff format scripts/hooks/preflight_intent.py
jinhongkuan a50d723
fix(e2e): materialize UserPromptSubmit hook into test target settings
jinhongkuan 697dc6e
fix(hook): emit hookSpecificOutput envelope so additionalContext reac…
jinhongkuan f97ddab
test(e2e): split Flow 2 into auto-fire (Flow 2) + correction-capture …
jinhongkuan e961cad
style: ruff format tests/e2e/run_e2e_flows.py
jinhongkuan cf48270
fix(hooks): SessionEnd hook drift — re-entrancy guard + --auto-ingest…
Knapp-Kevin 17907fb
test(e2e): add Flow 4 path-X-(b) ledger validation (#147)
Knapp-Kevin 82a493e
test(e2e): bootstrap .bicameral/ + pass --mcp-config to SessionEnd su…
Knapp-Kevin 975dc83
test(e2e): point Flow 4 advisory at #156 (design pivot) instead of #154
jinhongkuan e72a418
refactor(e2e): single source of truth for harness + recording setup
jinhongkuan c95c6a8
fix(skill): capture refinements when prompt contradicts surfaced deci…
jinhongkuan e7323c8
test(e2e): rewrite demo flow prompts in realistic per-role voice
jinhongkuan 0b79e35
feat: carry over v0 CI workflows + demo recording + dev-cycle docs fr…
jinhongkuan e7f0969
fix(ci): carry over missing tests/e2e/bicameral.mcp.json from dev
jinhongkuan 3b3e8dc
fix(ci): wire ruff + mypy into [test] extra and add config sections
jinhongkuan 6cb0e5f
fix(e2e): bump claude CLI flow timeout 300s → 480s
jinhongkuan 9901fb6
Merge pull request #171 from BicameralAI/fix/flow1-asserter-relax-fea…
jinhongkuan 2b20bb2
Merge pull request #168 from BicameralAI/fix/154-postflight-capture-hook
jinhongkuan b178e13
Merge pull request #172 from BicameralAI/fix/preflight-after-discovery
jinhongkuan b3fb654
Merge pull request #174 from BicameralAI/feat/preflight-graph-expansion
jinhongkuan c7d1274
Merge branch 'main' into triage-from-dev
jinhongkuan 3a44116
style(ci): apply ruff fixes + format to unblock lint workflow on tria…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Apply merged-to-dev label | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [dev] | ||
| types: [closed] | ||
|
|
||
| jobs: | ||
| label: | ||
| name: Label closed-by-PR issues | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.merged == true | ||
| permissions: | ||
| issues: write | ||
| pull-requests: read | ||
| steps: | ||
| - name: Apply merged-to-dev label | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| // Workflow caveat: this job needs Settings -> Actions -> | ||
| // General -> Workflow permissions set to "Read and write | ||
| // permissions" at the repo level. The job-level | ||
| // `permissions: issues: write` block can only NARROW what | ||
| // the repo allows, never expand it. If the repo default | ||
| // is read-only, addLabels returns 403 "Resource not | ||
| // accessible by integration" regardless of the job-level | ||
| // grant. | ||
| // | ||
| // See: #115 (root cause + symptoms) and #104 (admin-side | ||
| // fix tracked alongside branch-protection setup). | ||
| // | ||
| // GitHub close keywords (case-insensitive): close, closes, | ||
| // closed, fix, fixes, fixed, resolve, resolves, resolved. | ||
| const pr = context.payload.pull_request; | ||
| const body = pr.body || ""; | ||
| const closeRegex = /(?:close[sd]?|fix(?:es|ed)?|resolve[sd]?)\s+#(\d+)/gi; | ||
| const matches = [...body.matchAll(closeRegex)]; | ||
| const issues = [...new Set(matches.map(m => parseInt(m[1])))]; | ||
|
|
||
| const failed = []; | ||
| for (const num of issues) { | ||
| try { | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: num, | ||
| labels: ["merged-to-dev"] | ||
| }); | ||
| console.log(`Labeled #${num}`); | ||
| } catch (e) { | ||
| console.log(`Failed to label #${num}: ${e.message}`); | ||
| failed.push({ num, message: e.message }); | ||
| } | ||
| } | ||
|
|
||
| if (failed.length > 0) { | ||
| const summary = failed | ||
| .map(f => ` - #${f.num}: ${f.message}`) | ||
| .join("\n"); | ||
| throw new Error( | ||
| `merged-to-dev labeller could not label ${failed.length} ` + | ||
| `issue(s) referenced by PR #${pr.number}:\n${summary}\n\n` + | ||
| `Most likely cause: repo Settings -> Actions -> General -> ` + | ||
| `Workflow permissions is set to read-only. ` + | ||
| `Job-level "permissions: issues: write" cannot expand a ` + | ||
| `read-only repo default. See #104 (admin fix) and ` + | ||
| `#115 (root cause).` | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Lint & Type Check | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main, dev] | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: ruff + mypy | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| cache: 'pip' | ||
| - name: Install | ||
| run: pip install -e ".[test]" | ||
| - name: Ruff check | ||
| run: ruff check . | ||
| - name: Ruff format check | ||
| run: ruff format --check . | ||
| - name: Mypy | ||
| run: mypy . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Secret Scan | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main, dev] | ||
|
|
||
| # gitleaks-action@v2 requires a paid license for organizations | ||
| # (https://github.com/gitleaks/gitleaks-action#-announcement). | ||
| # We use trufflehog instead — free for all repos, equally capable | ||
| # detector ruleset, and faster cold-start than spinning up a | ||
| # gitleaks container. | ||
| jobs: | ||
| trufflehog: | ||
| name: TruffleHog | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # full history so trufflehog can scan the diff range | ||
| - uses: trufflesecurity/trufflehog@main | ||
| with: | ||
| base: ${{ github.event.pull_request.base.sha }} | ||
| head: ${{ github.event.pull_request.head.sha }} | ||
| extra_args: --only-verified | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: BicameralAI/bicameral-mcp
Length of output: 105
🏁 Script executed:
Repository: BicameralAI/bicameral-mcp
Length of output: 518
🌐 Web query:
GitHub Actions best practices security pinning immutable commit SHA mutable branch@main``💡 Result:
GitHub Actions security best practices emphasize pinning actions to full-length commit SHAs for immutability, rather than mutable branches like
@mainor tags, to prevent supply chain attacks where tags/branches are rewritten to malicious commits. Key recommendations: - Always pin actions to a full 40-character SHA: uses: actions/checkout@93cb6ef # v4 - Avoid@main,@master,@latest, or tags (@v1) unless you fully trust the maintainer, as they are mutable. - Add comments indicating the version for maintainability. - Use GitHub policies to enforce SHA pinning at repo/org level. - Tools like Dependabot/Renovate for updates; scripts to find unpinned uses. - For actions/checkout specifically, pin the action itself to SHA; the 'ref' input defaults securely to the triggering commit SHA ($GITHUB_SHA), which is immutable per run. - Branches like@mainin triggers (on: push: branches: [main]) are standard and not a security risk for triggering, as workflows run on specific commits. Examples: Before (vulnerable): uses: actions/checkout@main or uses: actions/checkout@v4 After (secure): uses: actions/checkout@93cb6ef # v4.1.6 To get SHA: git ls-remote --tags https://github.com/actions/checkout.git refs/tags/v4Citations:
🌐 Web query:
trufflesecurity trufflehog action GitHub releases versions💡 Result:
TruffleHog GitHub releases (trufflesecurity/trufflehog) and what they mean for the TruffleHog GitHub Action. 1) GitHub release versions (as of 2026-05-03) - Latest release: v3.95.2 (shown as the latest release on the repository page). - Recent releases include: - v3.95.0 (published 2026-04-21). - v3.93.2 (published 2026-02-10). The authoritative source for “what versions have been released” is the GitHub Releases page for trufflesecurity/trufflehog. 2) TruffleHog GitHub Action: how “versions” are selected The TruffleHog GitHub Action is defined in the repository as a composite action (action.yml). It has an input named version, which defaults to "latest". When the action runs, it executes the TruffleHog CLI from the TruffleHog container image tag ghcr.io/trufflesecurity/trufflehog:${VERSION}. So: - Using trufflesecurity/trufflehog@main (or
@vX.Y.Zfor the action definition) controls the action workflow code. - The actual TruffleHog CLI version used at runtime is controlled by the action input version (default latest), which maps to a ghcr.io/trufflesecurity/trufflehog container tag. 3) Practical guidance (example) - To pin the TruffleHog CLI version used by the action: uses: trufflesecurity/trufflehog@main with: version: v3.95.0 Cited evidence - GitHub Releases page and release tag details show the release versions (e.g., v3.95.0) and the existence of releases. - The repository page indicates the latest release is v3.95.2. - The action.yml input "version" default is "latest", and the docker command runs ghcr.io/trufflesecurity/trufflehog:${VERSION}.Citations:
Pin the TruffleHog action to an immutable revision.
Using
trufflesecurity/trufflehog@mainmakes this required security check depend on upstream branch movement. A force-push or compromised upstream repo can silently change what runs in CI. Pin to a full commit SHA or an immutable release tag (e.g.,@v3.95.2) instead.Suggested change
📝 Committable suggestion
🤖 Prompt for AI Agents