Improve block/risk/severity display in the audit page:
- Stats grid: color-coded backgrounds, zero-value muting with opacity
- Triage panel: structured 3-column layout with mini progress bar
- SkillAuditCard: BlockStamp (red tilted stamp vs green pass pill)
and RiskMeter (dashed box with horizontal bar + score)
- FindingRow: left border severity stripe, code snippets as torn
paper notes with wobbly borders and slight rotation
InstallTrackedRepo and updateTrackedRepo had no security audit,
allowing --track to bypass all supply-chain checks. This adds
auditTrackedRepo (removes repo on block for fresh installs) and
auditTrackedRepoUpdate (git reset rollback for updates), plus
input validation, testable removeAll, and hardened error handling
across audit/install/uninstall paths.
Replace simple regex-based markdown link extraction with a full
structural parser that handles inline links with titles, autolinks,
reference-style links, HTML anchors, multiline links, and correctly
skips code fences, inline code spans, and image links.
This ensures external-link and source-repository-link audit rules
match all Markdown link syntax variants while avoiding false positives
from code examples and images.
Merge auditGateAfterPull and auditGateAfterPullProject into a single
function by accepting an auditScanFunc callback. Callers pass either
audit.ScanSkill directly or a closure capturing projectRoot for
project-mode scans. Removes ~50 lines of duplicated security logic.
Addresses PR #43 review feedback (code duplication in audit gate).
--diff works for both tracked repos (git diff) and regular skills (hash
comparison) but docs only mentioned tracked repos. Also document the
audit risk score display in CLI/Web UI after updates, and add missing
flags (--diff, --skip-audit, --group) to built-in skill reference.
Air installed via `go install` lands in GOPATH/bin, not GOROOT/bin.
Resolve the path dynamically with fallback auto-install. Also replace
deprecated `bin` with `entrypoint` in .air.toml.
test-redteam-signal verifies the red team suite detects intentional
code mutations. test-redteam-rules-signal verifies it fails when
critical builtin audit rules are disabled.
Return auditRiskScore and auditRiskLabel in update results so the
dashboard can show security posture after both tracked-repo and
regular-skill updates. auditGateTrackedRepo now returns the audit
result alongside the blocked indicator.
Air needs time to compile before the server is ready. Add a
wait-for-port loop (max 30s) so the dashboard URL is only shown
after the API is actually listening.
For project mode, use SKILLSHARE_UI_EXEC_PREFIX to cd into the
project directory before exec'ing the binary, since skillshare ui -p
relies on os.Getwd() and air must build from /workspace.
Air watches cmd/ and internal/ for .go changes and auto-rebuilds.
Uses env vars (SKILLSHARE_UI_HOST, SKILLSHARE_UI_FLAGS) so the same
config works for both local dev and devcontainer.
Regular skills (non-git, metadata-based) now support --diff flag using
hash-based file comparison, display audit results after update, and
properly enforce the audit gate by not passing Force to inner Install.
- cmd/skillshare/update_test.go: table-driven test covering all
isSecurityError keywords (security audit, post-update audit,
rolled back, rollback failed) and negative cases
- internal/server/handler_update_test.go: three tests for
auditGateTrackedRepo: rollback failure warning on HIGH findings,
rollback failure warning on scan error, and clean repo returns nil
- handler_update.go: check git.ResetHard return value; if rollback
fails, append explicit warning to blocked message instead of
silently claiming rolled back
- update.go: add "post-update audit" to isSecurityError keywords
so install.Install audit failures are correctly classified as
security blocks in batch exit code
When a group directory (e.g. `fix-review`) was uninstalled as a whole,
only the directory name was checked against config entries. But skills
in the manifest use FullName format (`group/skill`), so the exact match
never hit. Now uses prefix matching to also remove member skill entries.
- P1: Batch/all update now returns non-zero when repos are blocked by
security audit (fail-closed for CI pipelines)
- P2: Pass --skip-audit to regular skill update via InstallOptions
- P2: Add path containment check in content integrity to prevent
directory traversal via crafted file_hashes keys
- P3: Switch git diff parsing to NUL-delimited (-z) for safe handling
of special filenames
Pin sha256 file hashes in .skillshare-meta.json during install/update.
Audit now detects content-tampered (MEDIUM), content-missing (LOW),
and content-unexpected (LOW) findings. Backward-compatible: skills
without file_hashes in meta are silently skipped.
Supply-chain hardening Phase 2:
- Add post-pull audit gate: HIGH/CRITICAL findings auto-rollback in
non-interactive mode (fail-closed), prompt in TTY mode
- Use full 40-char commit hashes for reliable rollback (avoids short-hash ambiguity)
- Add --skip-audit flag to bypass the gate when risk is accepted
- Add --diff flag to show file-level change summary after tracked repo update
- Add GetChangedFiles() and ResetHard() git helpers
- Add audit gate in install --update git-pull path to prevent bypass
Supply-chain hardening Phase 1:
- Add source-repository-link-0 rule (HIGH) to detect [source repository](url) patterns
- Exclude source-repo labels from external-link-0 to prevent double-reporting
- Introduce risk floor: RiskLabel = max(score-label, severity-floor) so a
single HIGH finding produces "high" risk instead of "low"
- Apply severity floor to CLI summary, server API summary, and per-result risk
Inspired by #39 — batch lines, summary box, severity counts, and
single-skill risk all use a consistent color ramp:
CRITICAL → red, HIGH → orange, MEDIUM → yellow, LOW/INFO → gray.
Also hide elapsed time when < 1s for cleaner batch output.
Add post-GoReleaser step that queries GitHub Compare API for commit
authors between tags, excludes bots and maintainer (runkids), and
appends a ## Contributors section with @mentions to the release body.
Uses RELEASE_TEMPLATE.md with envsubst (scoped to two variables) to
keep the format editable outside the workflow YAML.
Deduplicate bounded-concurrency worker pool that was repeated in
auditInstalled(), auditFiltered(), and handleAuditAll(). The new
audit.ParallelScan() centralises the pattern with index-aligned
results, reducing ~90 lines to a single reusable function.
firstPull now attempts merge when both local and remote have skills
instead of blocking. Update two integration tests to expect successful
merge with both skills preserved and synced to targets.
CodeX rejects skill descriptions exceeding 1024 characters (issue #40).
Trim description from 1050 to 785 chars by removing verbose feature
details already covered in the skill body.
Also update audit reference with multi-name/--group support and
external-link pattern, bump version to v0.15.3, and add external-link
and dangling-link demo skills to playground.
Closes#40
- firstPull: attempt merge instead of blocking when both local and
remote have skills; override merge.ff=only with -c merge.ff=false
- auditSkillByName: fall back to collectInstalledSkillPaths for
short-name resolution of nested skills (e.g. security/audit-demo-*)
- Add external-link and dangling-link demo skills to sandbox content
- Remove token vars from remoteEnv (localEnv overrides .env with empty)
- Pass host tokens via docker-compose environment as fallback
- Add profile.d script to source .devcontainer/.env in login shells
- Add sandbox token passthrough for GitLab/Bitbucket/generic tokens
- Add root .env to .gitignore
Add token auto-injection for private repo support across all platforms:
- Hub search (--hub): normalize web URLs to raw-content URLs and apply
platform-specific auth headers (GitLab, GitHub, Bitbucket)
- Web UI push/pull/update: use *WithAuth variants for git operations
- Export ResolveTokenForURL and DetectPlatformForURL from install/auth
Detect `[text](https://...)` patterns in skill files as a LOW severity
finding. External links may indicate prompt injection vectors or waste
tokens. Localhost/127.0.0.1/0.0.0.0 links are excluded via the rule's
exclude regex.
Closes#38
The built-in rule IDs table listed dangling-link alongside regex-based
rules with a "source of truth" link to rules.yaml, but dangling-link
uses filesystem lookups (os.Stat) and is not defined there. Add a note
explaining the distinction to avoid confusion.
Allow `skillshare audit a b c` and `--group`/`-G` flags to filter
which skills are scanned, matching the existing check/update pattern.
Single-name audit preserves detailed output; multi-target uses batch
format with parallel scanning.
Use bounded goroutine pool (max 8 workers) for audit.ScanSkill calls
in both auditInstalled (CLI) and handleAuditAll (API). Scan results
are collected into a pre-allocated slice, then processed sequentially
for deterministic output ordering and summary accumulation.
Add LC_ALL=C to git command environments in push, init commit, and
remote fetch to prevent locale-dependent output from breaking string
matching (e.g. "nothing to commit" in non-English locales).
Parallelize audit.ScanSkill in BuildIndex using goroutines with a
bounded semaphore (max 8 workers) to reduce index generation time
for large skill collections.
Variadic ...bool was used for backward compatibility but is non-idiomatic
Go for an internal API. Plain bool makes the function contract explicit
and simplifies the audit check from len(auditSkills) > 0 && auditSkills[0]
to a direct boolean test.