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
7 changes: 7 additions & 0 deletions .agents/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": {
"ultralytics-dev": {
"enabled": false
}
}
}
12 changes: 12 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,18 @@
},
"category": "development"
},
{
"name": "compliance",
"source": {
"source": "local",
"path": "./plugins/compliance"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "development"
},
{
"name": "reusable-app-components",
"source": {
Expand Down
10 changes: 10 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,16 @@
"category": "development",
"tags": ["mcp", "oauth2", "remote-mcp", "mcp-apps", "streamable-http", "pkce"]
},
{
"name": "compliance",
"source": "./plugins/compliance",
"description": "Audit web and OAuth apps for Google CASA Tier 2, OWASP headers, leaks, and privacy.",
"version": "1.0.0",
"license": "Apache-2.0",
"keywords": ["compliance", "casa", "casa-tier-2", "oauth2", "security", "owasp", "privacy"],
"category": "development",
"tags": ["compliance", "casa", "security", "oauth2", "privacy"]
},
{
"name": "reusable-app-components",
"source": "./plugins/reusable-app-components",
Expand Down
3 changes: 3 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ enabled = true
[plugins."remote-mcp-skills@claude-settings"]
enabled = true

[plugins."compliance@claude-settings"]
enabled = true

[plugins."typescript-skills@claude-settings"]
enabled = true

Expand Down
7 changes: 7 additions & 0 deletions .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@
"version": "1.0.1",
"license": "Apache-2.0"
},
{
"name": "compliance",
"source": "./plugins/compliance",
"description": "Audit web and OAuth apps for Google CASA Tier 2, OWASP headers, leaks, and privacy.",
"version": "1.0.0",
"license": "Apache-2.0"
},
{
"name": "reusable-app-components",
"source": "./plugins/reusable-app-components",
Expand Down
3 changes: 3 additions & 0 deletions .gemini/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"codex-advisor": {
"enabled": true
},
"compliance": {
"enabled": true
},
"fable-advisor": {
"enabled": true
},
Expand Down
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,33 @@ Pairs naturally with `qa`.

</details>

<details>
<summary><strong>compliance</strong> - Audit web and OAuth apps for Google CASA Tier 2, OWASP headers, leaks, and privacy</summary>

| Claude Code | Codex CLI | Cursor | Antigravity CLI |
| --- | --- | --- | --- |
| `claude plugin install compliance@claude-settings` | `codex plugin add compliance@claude-settings` | Run `agent`, enter `/plugin`, and install by name | `uv run .github/scripts/antigravity.py install compliance` |

**Skills CLI**

```bash
npx skills add https://github.com/fcakyon/claude-codex-settings/tree/main/plugins/compliance --skill '*'
```

Run repeatable security, dependency, privacy, and compliance audits before shipping or submitting for third-party assessments.

- Inspect live HTTPS endpoints for HSTS, CSP, framing headers, cookie flags, wildcard CORS, and exposed dotfiles.
- Run `govulncheck`, `npm audit --omit=dev`, secret scans, encryption/revocation checks, and `Dockerfile` user validation.
- Reuse weekly OpenShip Actions and GitHub Actions workflows with OWASP ZAP baseline scans.

| Skill | Purpose | ZIP |
| --- | --- | --- |
| [`casa-audit`](./plugins/compliance/skills/casa-audit/SKILL.md) | Google CASA Tier 2, OWASP headers, and Limited Use audit | [![ZIP](https://img.shields.io/badge/⬇%20ZIP-2ea44f?style=flat-square)](https://github.com/fcakyon/claude-codex-settings/releases/latest/download/casa-audit.zip) |

Pairs naturally with `qa` and `remote-mcp-skills`.

</details>

<details>
<summary><strong>test-audit</strong> - Keep only tests that catch real bugs, and prune ones that just restate the code</summary>

Expand Down Expand Up @@ -1425,7 +1452,7 @@ Configuration in [`.gemini/config/config.json`](./.gemini/config/config.json) an

- **Mode & Sandbox**: `auto` mode with `proceed-in-sandbox`, terminal sandbox enabled, always-on alt-screen rendering, and desktop notifications
- **Permissions**: allow rules for selected Git, GitHub CLI, search and developer commands and trusted URLs, plus `deny` rules blocking force pushes and `git rebase`
- **Plugins**: curated Antigravity-compatible plugin set enabled in `.gemini/config/config.json` (`agent-browser`, `code-review`, `codex-advisor`, `fable-advisor`, `frontend-design-skills`, `github-dev`, `google-telemetry`, `heroui-skills`, `humanize`, `modern-web-guidance`, `openai-office-skills`, `python-skills`, `qa`, `remote-mcp-skills`, `reusable-app-components`, `seo-skills`, `simplify`, `swift-skills`, `typescript-skills`, `ultralytics-dev`)
- **Plugins**: curated Antigravity-compatible plugin set enabled in `.gemini/config/config.json` (`agent-browser`, `code-review`, `codex-advisor`, `compliance`, `fable-advisor`, `frontend-design-skills`, `github-dev`, `google-telemetry`, `heroui-skills`, `humanize`, `modern-web-guidance`, `openai-office-skills`, `python-skills`, `qa`, `remote-mcp-skills`, `reusable-app-components`, `seo-skills`, `simplify`, `swift-skills`, `typescript-skills`, `ultralytics-dev`)
- **Sync**: run `uv run .github/scripts/antigravity.py sync` to install the enabled plugins and merge settings into `~/.gemini` without removing existing local plugins or `trustedWorkspaces`

</details>
Expand Down
12 changes: 12 additions & 0 deletions plugins/compliance/.antigravity-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://antigravity.google/schemas/v1/plugin.json",
"name": "compliance",
"version": "1.0.0",
"description": "Audit web and OAuth apps for Google CASA Tier 2, OWASP headers, leaks, and privacy.",
"author": {
"name": "Fatih C. Akyon"
},
"homepage": "https://github.com/fcakyon/claude-codex-settings#plugins",
"repository": "https://github.com/fcakyon/claude-codex-settings",
"license": "Apache-2.0"
}
11 changes: 11 additions & 0 deletions plugins/compliance/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "compliance",
"version": "1.0.0",
"description": "Audit web and OAuth apps for Google CASA Tier 2, OWASP headers, leaks, and privacy.",
"author": {
"name": "Fatih C. Akyon"
},
"homepage": "https://github.com/fcakyon/claude-codex-settings#plugins",
"repository": "https://github.com/fcakyon/claude-codex-settings",
"license": "Apache-2.0"
}
11 changes: 11 additions & 0 deletions plugins/compliance/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "compliance",
"version": "1.0.0",
"description": "Audit web and OAuth apps for Google CASA Tier 2, OWASP headers, leaks, and privacy.",
"author": {
"name": "Fatih C. Akyon"
},
"homepage": "https://github.com/fcakyon/claude-codex-settings#plugins",
"repository": "https://github.com/fcakyon/claude-codex-settings",
"license": "Apache-2.0"
}
11 changes: 11 additions & 0 deletions plugins/compliance/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "compliance",
"version": "1.0.0",
"description": "Audit web and OAuth apps for Google CASA Tier 2, OWASP headers, leaks, and privacy.",
"author": {
"name": "Fatih C. Akyon"
},
"homepage": "https://github.com/fcakyon/claude-codex-settings#plugins",
"repository": "https://github.com/fcakyon/claude-codex-settings",
"license": "Apache-2.0"
}
15 changes: 15 additions & 0 deletions plugins/compliance/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "@fcakyon/compliance",
"version": "1.0.0",
"private": true,
"type": "module",
"bin": {
"casa-audit": "scripts/casa-audit.mjs"
},
"scripts": {
"test": "node --test tests/*.test.mjs"
},
"engines": {
"node": ">=22"
}
}
152 changes: 152 additions & 0 deletions plugins/compliance/scripts/casa-audit.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
#!/usr/bin/env node
/**
* Reusable CASA Tier 2 (ADA AL1 / OWASP ASVS L2) pre-submission audit CLI.
* Designed to run against any web/OAuth repository and/or public HTTPS URL with zero external dependencies.
*/

import fs from "node:fs";
import { fileURLToPath } from "node:url";
import { SEVERITY_RANK, makeFinding } from "./checks/common.mjs";
import { auditUrl } from "./checks/http.mjs";
import { auditRepo } from "./checks/repo.mjs";
import { auditPrivacyDoc } from "./checks/privacy.mjs";

export { auditUrl, auditRepo, auditPrivacyDoc };

function parseArgs(argv) {
const opts = {
urls: [],
repo: "",
privacyDoc: "",
format: "text",
failOn: "high",
skipVuln: false,
help: false,
};
for (let i = 0; i < argv.length; i += 1) {
const arg = argv[i];
if (arg === "--url" && argv[i + 1]) opts.urls.push(argv[++i]);
else if (arg === "--repo" && argv[i + 1]) opts.repo = argv[++i];
else if (arg === "--privacy-doc" && argv[i + 1]) opts.privacyDoc = argv[++i];
else if (arg === "--format" && argv[i + 1]) opts.format = argv[++i];
else if (arg === "--json") opts.format = "json";
else if (arg === "--markdown") opts.format = "markdown";
else if (arg === "--fail-on" && argv[i + 1]) opts.failOn = argv[++i];
else if (arg === "--skip-vuln") opts.skipVuln = true;
else if (arg === "-h" || arg === "--help") opts.help = true;
else throw new Error(`Unknown or incomplete argument: ${arg}`);
}
if (!Object.hasOwn(SEVERITY_RANK, opts.failOn)) {
throw new Error(`Invalid --fail-on value "${opts.failOn}". Expected high|medium|low|none.`);
}
if (!opts.urls.length && !opts.repo && !opts.privacyDoc) {
opts.repo = process.cwd();
}
return opts;
}

function manualChecks() {
return [
makeFinding(
"manual-casa-lab",
"manual",
"MANUAL",
"none",
"Authorized CASA Tier 2 lab assessment",
"Run annual authorized CASA Tier 2 lab scan and obtain Letter of Validation (LOV) after Trust & Safety triggers CASA.",
),
makeFinding(
"manual-demo-video",
"manual",
"MANUAL",
"none",
"OAuth consent and feature demo video",
"Record unlisted demo showing client_id on consent screen, requested scopes, end-user flow, and disconnect/revocation.",
),
makeFinding(
"manual-reviewer-account",
"manual",
"MANUAL",
"none",
"Google Trust & Safety test account instructions",
"Verify reviewer login path uses an isolated test allowlist/demo account before submitting Cloud Console review.",
),
];
}

/** Run the selected HTTP, repository, and privacy checks and summarize pass/fail counts. */
export async function runCasaAudit(opts) {
const findings = [];
for (const url of opts.urls || []) {
findings.push(...(await auditUrl(url)));
}
if (opts.repo) {
findings.push(...auditRepo(opts.repo, { skipVuln: Boolean(opts.skipVuln) }));
}
if (opts.privacyDoc || opts.repo) {
findings.push(...auditPrivacyDoc(opts.privacyDoc, { repoDir: opts.repo }));
}
findings.push(...manualChecks());

const counts = { pass: 0, warn: 0, fail: 0, skip: 0, manual: 0 };
const threshold = SEVERITY_RANK[opts.failOn || "high"];
let exceedsThreshold = false;
for (const f of findings) {
counts[f.status.toLowerCase()] = (counts[f.status.toLowerCase()] || 0) + 1;
if (f.status === "FAIL" && threshold > 0 && (SEVERITY_RANK[f.severity] || 0) >= threshold) {
exceedsThreshold = true;
}
}
return {
tool: "casa-audit",
failOn: opts.failOn || "high",
passed: !exceedsThreshold,
counts,
findings,
};
}

function formatMarkdown(report) {
const lines = [
"# CASA Tier 2 Audit Report",
"",
`- **Result**: ${report.passed ? "PASS" : "FAIL"} (\`--fail-on ${report.failOn}\`)`,
`- **Counts**: PASS=${report.counts.pass}, WARN=${report.counts.warn}, FAIL=${report.counts.fail}, SKIP=${report.counts.skip}, MANUAL=${report.counts.manual}`,
"",
"| Status | Severity | Check | Detail |",
"| --- | --- | --- | --- |",
];
for (const f of report.findings) {
const cleanDetail = String(f.detail || "").replaceAll("|", "\\|").replaceAll("\n", " ");
lines.push(`| ${f.status} | ${f.severity} | ${f.title} (\`${f.id}\`) | ${cleanDetail} |`);
}
return lines.join("\n") + "\n";
}

function formatText(report) {
const lines = report.findings.map((f) => `[${f.status}${f.severity !== "none" ? `/${f.severity}` : ""}] ${f.id}: ${f.title} — ${f.detail}`);
lines.push(`Summary: pass=${report.counts.pass} warn=${report.counts.warn} fail=${report.counts.fail} skip=${report.counts.skip} manual=${report.counts.manual} result=${report.passed ? "PASS" : "FAIL"}`);
return lines.join("\n") + "\n";
}

async function main() {
const opts = parseArgs(process.argv.slice(2));
if (opts.help) {
process.stdout.write(
"Usage: casa-audit.mjs [--url <https://...>] [--repo <dir>] [--privacy-doc <file>] [--format json|markdown|text] [--fail-on high|medium|low|none] [--skip-vuln]\n",
);
return;
}
const report = await runCasaAudit(opts);
if (opts.format === "json") process.stdout.write(JSON.stringify(report, null, 2) + "\n");
else if (opts.format === "markdown") process.stdout.write(formatMarkdown(report));
else process.stdout.write(formatText(report));
process.exitCode = report.passed ? 0 : 1;
}

if (process.argv[1] && fs.realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
main().catch((err) => {
process.stderr.write(`casa-audit error: ${err.message}\n`);
process.exitCode = 2;
});
}
6 changes: 6 additions & 0 deletions plugins/compliance/scripts/checks/common.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const SEVERITY_RANK = { high: 3, medium: 2, low: 1, none: 0 };

/** Build a normalized compliance check finding object. */
export function makeFinding(id, category, status, severity, title, detail) {
return { id, category, status, severity, title, detail };
}
Loading
Loading