Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changelog

## [1.1.29] - 2026-06-16
## Unreleased

### Added
- Added native DSH threat-feed subscription management, advisory self-check discovery, and queued delivery of cron notifications to active DSH sessions.
- Added HTTPS GitHub repository support to `agentguard scan`, including `--ref` selection for branches, tags, fully qualified refs, and full commit SHAs, with bounded non-interactive Git acquisition.

### Fixed
- Improved DSH subscription cleanup and artifact discovery, and made system cron status failures explicit.
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ No Cloud account or network connection is required for the local runtime guard.
# Scan a local skill or plugin
agentguard scan ./examples/vulnerable-skill

# Or scan an HTTPS GitHub repository before installing it
agentguard scan https://github.com/owner/repository --json

# Select a branch or tag; use a full commit SHA when the scan must be reproducible
agentguard scan https://github.com/owner/repository --ref v1.2.3 --json

# Evaluate one runtime action from stdin
printf '{"tool_name":"Bash","tool_input":{"command":"curl https://example.com/install.sh | bash"}}' | agentguard protect

Expand Down
6 changes: 6 additions & 0 deletions docs/codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ Codex can use AgentGuard as a local skill/runtime template for command, file, an
npm install -g @goplus/agentguard
agentguard init
agentguard scan ./skills/example
agentguard scan https://github.com/owner/repository --ref v1.2.3 --json
```

`scan` accepts local directories and HTTPS GitHub repository URLs. `--ref`
accepts a branch, tag, fully qualified ref, or full commit SHA. Branches and tags
select a revision but can move; use a full commit SHA when the scan must be
reproducible.

## Runtime template

To write Codex templates in the current project:
Expand Down
31 changes: 20 additions & 11 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from './config.js';
import type { AgentGuardAgentHost, AgentGuardConfig } from './config.js';
import { SkillScanner } from './scanner/index.js';
import { resolveScanSource } from './scanner/source.js';
import { formatProtectResult, protectAction, exitCodeForDecision } from './runtime/protect.js';
import { approvePendingApproval, listPendingApprovals } from './runtime/approvals.js';
import { getDefaultEffectiveRuntimePolicy, loadCachedPolicy, saveCachedPolicy } from './runtime/policy.js';
Expand Down Expand Up @@ -366,19 +367,27 @@ async function main() {

program
.command('scan')
.description('Scan a local skill/plugin directory')
.argument('<path>', 'Directory to scan')
.description('Scan a local skill/plugin directory or HTTPS GitHub repository')
.argument('<repo-or-path>', 'Local directory or https://github.com/owner/repo URL')
.option('--ref <ref>', 'GitHub branch, tag, fully qualified ref, or full commit SHA')
.option('--json', 'Print JSON output')
.action(async (path, options) => {
const scanner = new SkillScanner({ useExternalScanner: false });
const result = await scanner.quickScan(path);
if (options.json) {
console.log(JSON.stringify(result, null, 2));
} else {
console.log(`${result.risk_level.toUpperCase()}: ${result.summary}`);
if (result.risk_tags.length) console.log(`Tags: ${result.risk_tags.join(', ')}`);
.action(async (input, options) => {
const source = await resolveScanSource(String(input), {
ref: options.ref === undefined ? undefined : String(options.ref),
});
try {
const scanner = new SkillScanner({ useExternalScanner: false });
const result = await scanner.quickScan(source.rootDir);
if (options.json) {
console.log(JSON.stringify(result, null, 2));
} else {
console.log(`${result.risk_level.toUpperCase()}: ${result.summary}`);
if (result.risk_tags.length) console.log(`Tags: ${result.risk_tags.join(', ')}`);
}
process.exitCode = result.risk_level === 'critical' ? 2 : 0;
} finally {
await source.cleanup();
}
process.exitCode = result.risk_level === 'critical' ? 2 : 0;
});

program
Expand Down
Loading
Loading