-
Notifications
You must be signed in to change notification settings - Fork 0
feat(mcp): vox_tool_search — progressive tool disclosure #263
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
Changes from 19 commits
ef51795
a4da44f
16992f3
43dad0b
50c52ef
b5fc562
09ecbcc
e72eaec
4f8d83f
a4ec001
0e0a2d0
d018d05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # Asserts that the workspace version in Cargo.toml matches the pushed git tag. | ||
| # | ||
| # Why: releases are driven by pushing a `v*` tag (release-binaries.yml, | ||
| # release-gui.yml, release-installers.yml all trigger on `tags: "v*"` and stamp | ||
| # the binary version from `github.ref_name`). The Cargo.toml | ||
| # `[workspace.package] version` is bumped by hand, so it can drift from the tag — | ||
| # e.g. tagging `v0.7.0` while Cargo.toml still says `0.6.0`. That ships a binary | ||
| # whose embedded `CARGO_PKG_VERSION` lies about its own release, which in turn | ||
| # breaks `vox upgrade`'s semver comparison and the GitHub update-notification | ||
| # check. This guard fails fast (before any artifact is built) on mismatch. | ||
| # | ||
| # This is a lightweight, hosted-only check so it never depends on the | ||
| # self-hosted fleet. Make it a required check on tag events to enforce. | ||
| name: version-tag-guard | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: version-tag-guard-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| assert-version-matches-tag: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Locate and print relevant sections for the referenced workflows
files=(
".github/workflows/version-tag-guard.yml"
".github/workflows/release-binaries.yml"
)
for f in "${files[@]}"; do
if [ ! -f "$f" ]; then
echo "MISSING FILE: $f" >&2
continue
fi
echo "==== $f ===="
# Print around likely mentioned lines; also include any uses: lines
nl -ba "$f" | sed -n '1,220p' | sed -n '1p; /uses:/p;'
echo "---- context around line 32 (best effort) ----"
nl -ba "$f" | sed -n '20,50p'
echo "---- context around line 135 (best effort) ----"
nl -ba "$f" | sed -n '120,160p'
done
# Global search for unpinned uses: within these two workflows
echo "==== ACTION USES (all) in version-tag-guard.yml ===="
rg -n "^\s*-\s*uses:\s*[^#\s]+" .github/workflows/version-tag-guard.yml || true
echo "==== ACTION USES (all) in release-binaries.yml ===="
rg -n "^\s*-\s*uses:\s*[^#\s]+" .github/workflows/release-binaries.yml || true
# Check for checkout persistence setting
echo "==== checkout credential persistence settings ===="
rg -n "persist-credentials|persist_credentials" .github/workflows/version-tag-guard.yml .github/workflows/release-binaries.yml || trueRepository: vox-foundation/vox Length of output: 174 🏁 Script executed: #!/bin/bash
set -euo pipefail
files=(
".github/workflows/version-tag-guard.yml"
".github/workflows/release-binaries.yml"
)
awk_print_range() {
local f="$1" start="$2" end="$3"
awk -v s="$start" -v e="$end" '{if(NR>=s && NR<=e) printf "%5d %s\n", NR, $0}' "$f"
}
for f in "${files[@]}"; do
echo "==== $f (exists? $(test -f "$f" && echo yes || echo no)) ===="
if [ ! -f "$f" ]; then
continue
fi
echo "---- context around line 32 ----"
awk_print_range "$f" 20 50
echo "---- context around line 135 ----"
awk_print_range "$f" 120 160
echo "---- all uses: lines in file ----"
rg -n "^[[:space:]]*-[[:space:]]uses:" "$f" || true
echo "---- uses: lines with version-like refs (not SHAs or v tags) ----"
rg -n "^[[:space:]]*-[[:space:]]uses:[[:space:]]*[^#[:space:]]+" "$f" || true
echo "---- checkout credential persistence settings (if any) ----"
rg -n "persist-credentials|persist_credentials" "$f" || true
echo
doneRepository: vox-foundation/vox Length of output: 4767 🌐 Web query:
💡 Result: The persist-credentials input for the GitHub actions/checkout action has a default value of true [1][2][3]. When set to true, the action configures the local git environment with the provided authentication token (commonly the GITHUB_TOKEN), which allows subsequent git commands (such as fetch, pull, or push) to run authenticated without additional configuration [1][3][4]. Security Recommendation It is widely recommended to set persist-credentials to false unless your workflow explicitly requires authenticated git operations (e.g., pushing commits back to the repository) [5]. Setting it to false is a security best practice for the following reasons: 1. Risk of Credential Exposure: By default, the authentication token is stored in the local git configuration of the checked-out repository [1][5][6]. If the workflow subsequently archives the repository directory as an artifact or if a malicious or compromised third-party action runs in the same environment, the token may be exposed or misused [5][6][7]. 2. Principle of Least Privilege: Disabling this option limits the window of opportunity for token misuse by ensuring that sensitive credentials are not unnecessarily persisted in the runner's file system [5]. To implement this security hardening, update your workflow step as follows: - uses: actions/checkout@v4 with: persist-credentials: false If you later determine that you need to perform authenticated git actions, you can manually authenticate using the token within the specific step, or re-enable the persistence only for the workflows that strictly require it [5]. Citations:
Pin third-party GitHub Actions to immutable SHAs + harden checkout credentials.
🧰 Tools🪛 zizmor (1.25.2)[warning] 32-32: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 32-32: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| - name: Compare Cargo.toml workspace version to git tag | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| tag="${GITHUB_REF_NAME}" # e.g. v0.7.0 | ||
| tag_version="${tag#v}" # strip leading v -> 0.7.0 | ||
|
|
||
| # Extract the FIRST `version = "..."` under the [workspace.package] | ||
| # table only, so we don't accidentally read a dependency's version. | ||
| cargo_version="$( | ||
| awk ' | ||
| /^\[workspace\.package\]/ { in_wp = 1; next } | ||
| /^\[/ { in_wp = 0 } | ||
| in_wp && /^[[:space:]]*version[[:space:]]*=/ { | ||
| # version = "0.6.0" -> 0.6.0 | ||
| gsub(/.*=[[:space:]]*"/, "") | ||
| gsub(/".*/, "") | ||
| exit | ||
| } | ||
| ' Cargo.toml | ||
| )" | ||
|
|
||
| echo "git tag : ${tag} (version ${tag_version})" | ||
| echo "Cargo.toml ver : ${cargo_version}" | ||
|
|
||
| if [ -z "${cargo_version}" ]; then | ||
| echo "::error::Could not read [workspace.package] version from Cargo.toml" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ "${tag_version}" != "${cargo_version}" ]; then | ||
| echo "::error::Version mismatch — git tag is '${tag_version}' but Cargo.toml [workspace.package] version is '${cargo_version}'. Bump Cargo.toml (and Cargo.lock) before tagging, or retag to match." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "OK: Cargo.toml version matches the release tag." | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "schema_version": 1, | ||
| "surface_count": 87, | ||
| "surface_count": 88, | ||
| "top_level_groups": [ | ||
| "add", | ||
| "ars", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| { | ||
| "catalog_operations": 533, | ||
| "catalog_operations": 534, | ||
| "paired_operations": 11, | ||
| "mcp_only_operations": 255, | ||
| "mcp_only_operations": 256, | ||
| "cli_only_operations": 267, | ||
| "mcp_tool_count": 266, | ||
| "mcp_tool_count": 267, | ||
| "cli_path_count": 278 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,11 @@ | ||
| //! Shared library for CLI primitives. | ||
|
|
||
| pub mod artifact_policy; | ||
| // `benchmark_telemetry`, `gamify_shim`, and `workflow_journal_codex` depend on | ||
| // vox-db / vox-gamify / vox-repository, which are pulled only by the default-on | ||
| // `db` feature. A `--no-default-features` build (the DB-free slice reused by the | ||
| // minimal `vox-langtool` binary) drops them. See Cargo.toml [features]. | ||
| #[cfg(feature = "db")] | ||
| pub mod benchmark_telemetry; | ||
| pub mod build_service; | ||
| pub mod cli_actions; | ||
|
|
@@ -10,8 +15,10 @@ pub mod daemon_ipc; | |
| pub mod db_types; | ||
| pub mod diagnostics; | ||
| pub mod fs_utils; | ||
| #[cfg(feature = "db")] | ||
| pub mod gamify_shim; | ||
| pub mod scientia; | ||
| #[cfg(feature = "db")] | ||
| pub mod workflow_journal_codex; | ||
|
Comment on lines
+21
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🤖 Prompt for AI Agents |
||
|
|
||
| /// Global flags available before every subcommand. | ||
|
|
||
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.
Use the required self-hosted label set for this Basic Linux workflow.
This job currently uses
ubuntu-latest; repository policy requiresruns-on: [self-hosted, linux, x64]for Basic Linux workflows unless it is one of the documented exceptions.As per coding guidelines, “Use
runs-on: [self-hosted, linux, x64]for Basic Linux GitHub Actions workflows.”🤖 Prompt for AI Agents
Source: Coding guidelines