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.
doGitInit() previously committed immediately (only .gitignore), but
installSkillIfNeeded() runs later — leaving skill files uncommitted.
This caused "Local changes detected" on first pull.
Move commit to a single commitSourceFiles() call at the end of init,
after all files are in place. Covers all scenarios:
performFreshInit (first-time init):
- No remote, no skill → 1 commit: "Initial commit" (.gitignore)
- No remote, with skill → 1 commit: "Initial skills" (.gitignore + skill)
- Remote empty → same as above, remote fetch is no-op
- Remote has skills → reset --hard to remote; commitSourceFiles is no-op
- Remote unreachable → same as no-remote (fetch fails gracefully)
handleExistingInit (init --remote on existing config):
- Git exists → commitSourceFiles is no-op (already committed)
- Git not exists, remote reachable → commit before setupGitRemote so
HEAD exists for reset --hard
- Git not exists, remote unreachable → commit .gitignore so push/pull
don't see "Local changes detected"
- CLI auth hint now shows PowerShell syntax on Windows, export on Unix
- Docs: add Windows PowerShell examples for GITLAB_TOKEN, BITBUCKET_TOKEN,
SKILLSHARE_GIT_TOKEN in environment-variables.md
- Docs: rewrite auth error section in common-errors.md with token env var
options, Windows syntax, and GitLab token type warning
Auth errors (Authentication failed, Access denied) were not detected by
hintGitRemoteError, causing push to misleadingly suggest "skillshare
pull" as a remedy. Now detects auth errors and shows actionable options
(SSH URL, token env vars, credential helper). Pull also benefits since
it shares hintGitRemoteError.
SKILL.md frontmatter may contain "version: v0.15.0" (with v prefix),
but callers already prepend "v" when formatting. Normalize at the
source by trimming the prefix in both ReadLocalSkillVersion and
FetchRemoteSkillVersion.
Scan .md files in skill directories for broken relative links during
audit. Targets that don't exist on disk produce a LOW severity finding
(pattern: dangling-link). External URLs, anchors, and fragments are
skipped.
Integrated into the existing walk (zero extra IO) and disableable via
audit-rules.yaml (- id: dangling-link / enabled: false). The init-rules
template, built-in skill reference, and website docs are updated.
Fixes multiple issues with the cross-machine sync workflow reported
in runkids/skillshare#35:
- push/pull auto-detect missing upstream and set it on first use
(push uses -u, pull uses fetch + reset + set-upstream-to)
- First pull checks local/remote skill directories before resetting;
refuses to overwrite local skills unless --force is passed
- init --remote auto-initializes git when config exists but .git does not
- HTTPS token auth (GITHUB_TOKEN, GITLAB_TOKEN, etc.) injected into
push, pull, and init remote fetch
- init --help shows init-specific flags and examples
- Remote repos with only files (README) no longer misdetected as
having skills (uses git ls-tree -d)
- Error hints suggest skillshare init --remote instead of raw git