Skip to content

Commit b0a05a1

Browse files
committed
Fix issues
1 parent 07a84a8 commit b0a05a1

File tree

24 files changed

+1377
-806
lines changed

24 files changed

+1377
-806
lines changed

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
commit-message:
8+
prefix: "chore(deps)"
9+
labels:
10+
- "dependencies"
11+
- "go"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
commit-message:
18+
prefix: "chore(ci)"
19+
labels:
20+
- "dependencies"
21+
- "ci"

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Test
1515
strategy:
1616
matrix:
17-
go-version: ['1.21', '1.22']
17+
go-version: ['1.24']
1818
os: [ubuntu-latest, macos-latest]
1919
runs-on: ${{ matrix.os }}
2020

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Binaries
22
ask
3+
ask-main
4+
ask-test
35
*.exe
46
*.exe~
57
*.dll

.goreleaser.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ brews:
5151
test: |
5252
system "#{bin}/ask", "--help"
5353
54+
nfpms:
55+
- file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
56+
vendor: Antigravity
57+
homepage: "https://github.com/yeasy/ask"
58+
maintainer: "yeasy <[email protected]>"
59+
description: "Agent Skills Kit - The Package Manager for Agent Skills"
60+
license: "MIT"
61+
formats:
62+
- deb
63+
- rpm
64+
bindir: /usr/bin
65+
5466
release:
5567
github:
5668
owner: yeasy

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
222222
- Configuration file support (`ask.yaml`)
223223
- Default repositories: Community, Anthropic, MCP-Servers, Scientific, Superpowers
224224

225-
[Unreleased]: https://github.com/yeasy/ask/compare/v0.2.0...HEAD
225+
[Unreleased]: https://github.com/yeasy/ask/compare/v1.3.2...HEAD
226+
[1.3.2]: https://github.com/yeasy/ask/compare/v1.3.1...v1.3.2
227+
[1.3.1]: https://github.com/yeasy/ask/compare/v1.1.3...v1.3.1
228+
[1.1.3]: https://github.com/yeasy/ask/compare/v1.1.2...v1.1.3
229+
[1.1.2]: https://github.com/yeasy/ask/compare/v1.1.0...v1.1.2
230+
[1.1.0]: https://github.com/yeasy/ask/compare/v1.0.0...v1.1.0
231+
[1.0.0]: https://github.com/yeasy/ask/compare/v1.0.0-rc2...v1.0.0
232+
[1.0.0-rc2]: https://github.com/yeasy/ask/compare/v0.9.0...v1.0.0-rc2
233+
[0.9.0]: https://github.com/yeasy/ask/compare/v0.8.0...v0.9.0
234+
[0.8.0]: https://github.com/yeasy/ask/compare/v0.7.6...v0.8.0
235+
[0.7.6]: https://github.com/yeasy/ask/compare/v0.7.5...v0.7.6
236+
[0.7.5]: https://github.com/yeasy/ask/compare/v0.7.4...v0.7.5
237+
[0.7.4]: https://github.com/yeasy/ask/compare/v0.7.3...v0.7.4
238+
[0.7.3]: https://github.com/yeasy/ask/compare/v0.7.2...v0.7.3
239+
[0.7.2]: https://github.com/yeasy/ask/compare/v0.7.1...v0.7.2
240+
[0.7.1]: https://github.com/yeasy/ask/compare/v0.7.0...v0.7.1
241+
[0.7.0]: https://github.com/yeasy/ask/compare/v0.6.1...v0.7.0
242+
[0.6.1]: https://github.com/yeasy/ask/compare/v0.6.0...v0.6.1
243+
[0.6.0]: https://github.com/yeasy/ask/compare/v0.5.0...v0.6.0
244+
[0.5.0]: https://github.com/yeasy/ask/compare/v0.4.0...v0.5.0
245+
[0.4.0]: https://github.com/yeasy/ask/compare/v0.2.0...v0.4.0
226246
[0.2.0]: https://github.com/yeasy/ask/compare/v0.1.0...v0.2.0
227247
[0.1.0]: https://github.com/yeasy/ask/releases/tag/v0.1.0

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ lint:
2929

3030
install:
3131
go install
32+
33+
coverage:
34+
go test -coverprofile=coverage.out ./...
35+
go tool cover -html=coverage.out -o coverage.html
36+
@echo "Coverage report generated: coverage.html"

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</p>
1414

1515
<p align="center">
16-
<a href="https://github.com/yeasy/ask/releases"><img src="https://img.shields.io/github/v/release/yeasy/ask?style=flat-square&color=blue" alt="Release"></a>
16+
<a href="https://github.com/lbjlaq/Antigravity-Manager/releases/tag/v1.3.3"><img src="https://img.shields.io/github/v/release/lbjlaq/Antigravity-Manager?style=flat-square&color=blue" alt="Release"></a>
1717
<a href="https://github.com/yeasy/ask/blob/main/LICENSE"><img src="https://img.shields.io/github/license/yeasy/ask?style=flat-square" alt="License"></a>
1818
<a href="https://github.com/yeasy/ask/stargazers"><img src="https://img.shields.io/github/stars/yeasy/ask?style=flat-square" alt="Stars"></a>
1919
<a href="https://goreportcard.com/report/github.com/yeasy/ask"><img src="https://goreportcard.com/badge/github.com/yeasy/ask?style=flat-square" alt="Go Report Card"></a>
@@ -90,13 +90,16 @@ brew install yeasy/tap/ask # CLI version
9090
brew install --cask yeasy/tap/ask-desktop # Desktop App (macOS only)
9191
```
9292

93+
> [!NOTE]
94+
> **macOS Users**: When opening `ask-desktop` for the first time, if you see an "unidentified developer" warning, please go to **System Settings > Privacy & Security**, and click **"Open Anyway"** in the Security section.
95+
9396
**Go Install:**
9497
```bash
9598
go install github.com/yeasy/ask@latest
9699
```
97100

98101
**Binary / Manual Install (Windows / Linux / Desktop):**
99-
Download the latest pre-compiled binary or Desktop App for your system from [Releases](https://github.com/yeasy/ask/releases).
102+
Download the latest pre-compiled binary or Desktop App for your system from [Releases](https://github.com/lbjlaq/Antigravity-Manager/releases/tag/v1.3.3).
100103

101104

102105
### 2. Initialize

README_zh.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</p>
1414

1515
<p align="center">
16-
<a href="https://github.com/yeasy/ask/releases"><img src="https://img.shields.io/github/v/release/yeasy/ask?style=flat-square&color=blue" alt="Release"></a>
16+
<a href="https://github.com/lbjlaq/Antigravity-Manager/releases/tag/v1.3.3"><img src="https://img.shields.io/github/v/release/lbjlaq/Antigravity-Manager?style=flat-square&color=blue" alt="Release"></a>
1717
<a href="https://github.com/yeasy/ask/blob/main/LICENSE"><img src="https://img.shields.io/github/license/yeasy/ask?style=flat-square" alt="License"></a>
1818
<a href="https://github.com/yeasy/ask/stargazers"><img src="https://img.shields.io/github/stars/yeasy/ask?style=flat-square" alt="Stars"></a>
1919
<img src="https://img.shields.io/badge/Go-1.24+-00ADD8?style=flat-square&logo=go" alt="Go Version">
@@ -89,6 +89,9 @@ brew install yeasy/tap/ask # 命令行版本
8989
brew install --cask yeasy/tap/ask-desktop # 桌面应用 (仅 macOS)
9090
```
9191

92+
> [!NOTE]
93+
> **macOS 用户请注意**:首次打开 `ask-desktop` 时若提示"无法验证开发者",请前往 **系统设置 > 隐私与安全性**,在"安全性"区域点击 **"仍要打开" (Open Anyway)** 即可正常运行。
94+
9295
**源码安装:**
9396
```bash
9497
git clone https://github.com/yeasy/ask.git
@@ -97,7 +100,7 @@ make build && mv ask /usr/local/bin/
97100
```
98101

99102
**二进制 / 手动安装 (Windows / Linux):**
100-
请前往 [Releases](https://github.com/yeasy/ask/releases) 页面下载对应系统的预编译二进制文件。
103+
请前往 [Releases](https://github.com/lbjlaq/Antigravity-Manager/releases/tag/v1.3.3) 页面下载对应系统的预编译二进制文件。
101104

102105

103106

@@ -192,19 +195,43 @@ export ASK_LOG=debug
192195
ask skill install browser-use
193196
```
194197

198+
## ⌨️ Shell 自动补全
199+
200+
ASK 支持智能 Tab 补全,可补全技能名称、仓库名称和 agent 参数。
201+
202+
**设置 (一次性):**
203+
```bash
204+
# Bash
205+
ask completion bash > $(brew --prefix)/etc/bash_completion.d/ask
206+
207+
# Zsh
208+
ask completion zsh > "${fpath[1]}/_ask"
209+
210+
# Fish
211+
ask completion fish > ~/.config/fish/completions/ask.fish
212+
```
213+
214+
**支持功能:**
215+
- `ask skill install <TAB>` - 从缓存中补全技能名
216+
- `ask skill uninstall <TAB>` - 从已安装技能中补全
217+
- `ask repo sync <TAB>` - 从已配置仓库中补全
218+
- `ask install --agent <TAB>` - 补全 agent 名称 (claude, cursor, codex 等)
219+
195220
## 📊 安全审计报告
196221

197222
<img src="reports/anthropics.png" width="300">
198223
<img src="reports/openai.png" width="300">
199224
<img src="reports/composio.png" width="300">
200225
<img src="reports/vercel.png" width="300">
226+
<img src="reports/superpowers.png" width="300">
201227

202228
完整安全审计报告:
203229

204230
- [🛡️ Anthropic 安全审计报告](reports/anthropics.html)
205231
- [🛡️ OpenAI 安全审计报告](reports/openai.html)
206232
- [🛡️ Composio 安全审计报告](reports/composio.html)
207233
- [🛡️ Vercel 安全审计报告](reports/vercel.html)
234+
- [🛡️ Superpowers 安全审计报告](reports/superpowers.html)
208235

209236
## 🤝 贡献参与
210237
欢迎提交 PR 或 Issue!详见 [CONTRIBUTING.md](CONTRIBUTING.md)

SECURITY.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 1.x.x | :white_check_mark: |
8+
| < 1.0 | :x: |
9+
10+
## Reporting a Vulnerability
11+
12+
We take security issues in ASK seriously. If you discover a security vulnerability, please follow these steps:
13+
14+
### 1. Do NOT Open a Public Issue
15+
16+
Security vulnerabilities should not be disclosed publicly until they have been addressed.
17+
18+
### 2. Send a Private Report
19+
20+
Please report security vulnerabilities by emailing:
21+
22+
- **Email**: [Create a security advisory](https://github.com/yeasy/ask/security/advisories/new) on GitHub
23+
24+
Or use GitHub's private vulnerability reporting feature:
25+
1. Go to the [Security tab](https://github.com/yeasy/ask/security) of the repository
26+
2. Click "Report a vulnerability"
27+
3. Fill in the details
28+
29+
### 3. Include Details
30+
31+
Please include the following in your report:
32+
33+
- **Description**: A clear description of the vulnerability
34+
- **Steps to Reproduce**: Detailed steps to reproduce the issue
35+
- **Impact**: What could an attacker achieve with this vulnerability?
36+
- **Affected Versions**: Which versions are affected?
37+
- **Suggested Fix**: If you have one
38+
39+
### 4. Response Timeline
40+
41+
- **Initial Response**: Within 48 hours
42+
- **Status Update**: Within 7 days
43+
- **Fix Timeline**: Depends on severity
44+
- Critical: 24-72 hours
45+
- High: 1-2 weeks
46+
- Medium: 2-4 weeks
47+
- Low: Next release cycle
48+
49+
## Security Best Practices
50+
51+
When using ASK:
52+
53+
1. **Verify Skill Sources**: Only install skills from trusted repositories
54+
2. **Use Security Scanning**: Run `ask check` before installing new skills
55+
3. **Review Skill Code**: Inspect SKILL.md and associated files before installation
56+
4. **Keep Updated**: Regularly run `ask update` to get security patches
57+
5. **Use Lock Files**: Commit `ask.lock` to ensure reproducible installs
58+
59+
## Security Features
60+
61+
ASK includes built-in security features:
62+
63+
- **Entropy Analysis**: Detects potential secrets and API keys
64+
- **Dangerous Command Detection**: Identifies risky shell commands
65+
- **Binary File Scanning**: Flags suspicious executable files
66+
- **HTML Security Reports**: Generate detailed audit reports with `ask check -o report.html`
67+
68+
## Acknowledgments
69+
70+
We appreciate responsible disclosure and will acknowledge security researchers who report valid vulnerabilities.
71+
72+
Thank you for helping keep ASK secure! 🛡️

cmd/cmd_test.go

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -168,95 +168,3 @@ func TestInitCommandHelp(t *testing.T) {
168168
t.Error("expected init help to contain 'Initialize'")
169169
}
170170
}
171-
172-
func TestParseGitHubBrowserURL(t *testing.T) {
173-
tests := []struct {
174-
name string
175-
input string
176-
wantRepoURL string
177-
wantBranch string
178-
wantSubDir string
179-
wantSkillName string
180-
wantOK bool
181-
}{
182-
{
183-
name: "full URL with subdirectory",
184-
input: "https://github.com/anthropics/skills/tree/main/skills/mcp-builder",
185-
wantRepoURL: "https://github.com/anthropics/skills.git",
186-
wantBranch: "main",
187-
wantSubDir: "skills/mcp-builder",
188-
wantSkillName: "mcp-builder",
189-
wantOK: true,
190-
},
191-
{
192-
name: "URL with different branch",
193-
input: "https://github.com/owner/repo/tree/develop/path/to/skill",
194-
wantRepoURL: "https://github.com/owner/repo.git",
195-
wantBranch: "develop",
196-
wantSubDir: "path/to/skill",
197-
wantSkillName: "skill",
198-
wantOK: true,
199-
},
200-
{
201-
name: "URL without subdirectory - just branch",
202-
input: "https://github.com/owner/repo/tree/main",
203-
wantRepoURL: "https://github.com/owner/repo.git",
204-
wantBranch: "main",
205-
wantSubDir: "",
206-
wantSkillName: "repo",
207-
wantOK: true,
208-
},
209-
{
210-
name: "URL with trailing slash",
211-
input: "https://github.com/anthropics/skills/tree/main/skills/mcp-builder/",
212-
wantRepoURL: "https://github.com/anthropics/skills.git",
213-
wantBranch: "main",
214-
wantSubDir: "skills/mcp-builder",
215-
wantSkillName: "mcp-builder",
216-
wantOK: true,
217-
},
218-
{
219-
name: "non-tree URL (regular git URL)",
220-
input: "https://github.com/owner/repo.git",
221-
wantOK: false,
222-
},
223-
{
224-
name: "shorthand format - not a browser URL",
225-
input: "owner/repo/path/to/skill",
226-
wantOK: false,
227-
},
228-
{
229-
name: "empty string",
230-
input: "",
231-
wantOK: false,
232-
},
233-
}
234-
235-
for _, tt := range tests {
236-
t.Run(tt.name, func(t *testing.T) {
237-
gotRepoURL, gotBranch, gotSubDir, gotSkillName, gotOK := parseGitHubBrowserURL(tt.input)
238-
239-
if gotOK != tt.wantOK {
240-
t.Errorf("parseGitHubBrowserURL() ok = %v, want %v", gotOK, tt.wantOK)
241-
return
242-
}
243-
244-
if !tt.wantOK {
245-
return // No need to check other fields if we expected failure
246-
}
247-
248-
if gotRepoURL != tt.wantRepoURL {
249-
t.Errorf("parseGitHubBrowserURL() repoURL = %v, want %v", gotRepoURL, tt.wantRepoURL)
250-
}
251-
if gotBranch != tt.wantBranch {
252-
t.Errorf("parseGitHubBrowserURL() branch = %v, want %v", gotBranch, tt.wantBranch)
253-
}
254-
if gotSubDir != tt.wantSubDir {
255-
t.Errorf("parseGitHubBrowserURL() subDir = %v, want %v", gotSubDir, tt.wantSubDir)
256-
}
257-
if gotSkillName != tt.wantSkillName {
258-
t.Errorf("parseGitHubBrowserURL() skillName = %v, want %v", gotSkillName, tt.wantSkillName)
259-
}
260-
})
261-
}
262-
}

0 commit comments

Comments
 (0)