剑庭安
首页
黑客安全首页全部安全栏目 黑客技术黑客技术、渗透测试、漏洞利用工具与教程 安全软件安全工具、扫描器、检测与审计软件 病毒分析恶意软件分析、样本、逆向与沙箱 CTF思路CTF 题目、writeup、解题思路与工具 防护思路防御技术、加固、检测响应与蓝队 红蓝攻防红队攻击模拟、蓝队对抗、攻防演练 漏洞知识库漏洞、CVE、PoC、EXP 与安全研究
逆向|反编译
PHP源码PHP 网站源码、程序、系统 APP源码安卓/iOS APP 源码 ASP源码ASP 网站源码与程序 NET源码.NET 网站源码与系统 小程序源码微信/支付宝小程序源码 Dedecms风格模板Dedecms 织梦风格模板 Empirecms风格模板EmpireCMS 帝国风格模板 Discuz商业模板/插件Discuz 商业模板与插件 WordPress主题/插件WordPress 主题与插件 其它源码、模板其它各类源码与模板 游戏源码游戏源码与引擎项目 加密货币源码加密货币、区块链、钱包、USDT/比特币相关源码与工具 手游源码手机游戏源码、服务端、客户端与引擎项目 传奇源码热血传奇、传奇世界、复古传奇等客户端/服务端/引擎源码 页游源码网页游戏、H5 游戏、浏览器游戏源码 端游源码电脑单机游戏、PC 网游客户端/服务端源码
最新万能免驱动支持所有型号打印机下载程序 日历天气老黄历 · 每天同步真实日期与天气
站长工具站长工具 自助开通会员浏览该分类 其他资源qtziy SEO工具SEO工具 站群源码站群源码 泛程序泛程序 蜘蛛模板蜘蛛模板 蜘蛛池蜘蛛池 外链工具外链工具
搜索 自助开通会员🔓 破甲 API
登录 注册
首页 分类列表 防护思路 security-hardening - Portabl…
security-hardening - Portable defensive application security and AI-age 防护思路 点击放大
作者:admin 发布:2026-10-06

security-hardening - Portable defensive application security and AI-age

项目说明Security Hardening ReferenceA portable defensi security and AI-agent security skill for de, founders, DevOps engineers, and security practitioners…
资源可下载 免费下载 0 条讨论
会员资源
开通会员后即可下载全部资源。
登录后开通会员
会员方案
259浏览量
0讨论
2下载链接
可下载资源状态
内容可验证
更新 2026-10-06
人工审核发布
评论区答疑

security-hardening - Portable defensive application security and AI-age

项目说明

Security Hardening Reference

A portable defensi security and AI-agent security skill for de, founders, DevOps engineers, and security practitioners. Covers secure design, secure code review, infrastructure hardening, identity, privacy, incident response, management, and AI/LLM agent security.

Built on: OWASP, NIST 800-53 / 800-63B, CIS Benchmarks, OWASP ASVS.

---

Entry points

  • Humans: use this README.md for install, release channels, onboarding, and documentation licensing.

  • Agents: use INDEX.md for compact corpus na and SKILL.md for routing rules.
  • License

    This repository is licensed under the Apache License, 2.0. See LICENSE and NOTICE. If a file includes a different attribution or third-party restriction, that notice controls for that material.

    ---

    Core stance

  • Treat prompt injection, system prompt leakage, RAG poisoning, MCP abuse, and excessi autonomy as first-class security problems.

  • Do not treat the system prompt, model refusal behavior, or defaults as security boundaries.

  • Prefer read-only defaults, explicit ele, tool trust zones, structured , and operator- kill switches.

  • Use this repository as a portable skill and reference corpus; agents should follow the scan → triage → defensive fix → re-scan loop in SKILL.md when re AI-generated patches.
  • Operational secure review (agents)

    When re or hardening AI-generated code:

    Local Semgrep rules li semgrep/. The runbook is references/appsec/ai-code-secure-remediation.md.

    Example prompts:

    ---

    Official provider signals baked into this repo

    This corpus now explicitly incorporates recent official cybersecurity guidance and deployment signals from OpenAI, Google, and Anthropic:

  • OpenAI - Trusted Access for Cyber (February 5, 2026): OpenAI says GPT-5.3-Codex can work autonomously for hours or days on complex cyber tasks, and pairs that capability with identity , classifier-based monitoring, and trust-based access for higher-risk workflows. Source: OpenAI - Introducing Trusted Access for Cyber

  • Google - SAIF Risk Assessment (October 24, 2024): Google explicitly maps Data Poisoning, Prompt Injection, and Model Source Tampering to risk assessment and mitigation guidance for AI systems. Source: Google - SAIF Risk Assessment

  • Google - AI security announcements (July 15, 2025): Google says its Big Sleep agent found a real-world security flaw at risk of exploitation, reinforcing the case for AI-assisted defense with strong go. Source: Google - A summer of security: empowering cyber defenders with AI

  • Anthropic - Project Glasswing (April 2026): Anthropic says Claude Mythos Preview can surpass all but the most skilled humans at finding and exploiting software , so access is being limited to defensi rather than opened broadly. Source: Anthropic - Project Glasswing

  • Anthropic - Mythos system card listing (April 2026): Anthropic lists Mythos Preview on its official system cards page, which is the canonical public entry point for the model's capability and safety documentation. Source: Anthropic - Model system cards

  • Anthropic - Responsible Scaling Policy updates (page re April 18, 2026): Anthropic's RSP updates and required safeguards reinforce that stronger frontier models need stronger operational controls, including re infrastructure changes and cloud security posture management. Source: Anthropic - Responsible Scaling Policy
  • The practical implication for this repository is simple: as cyber-capable models improve, the default answer is not to give them more power. The default answer is to impro, logging, trust separation, incident response, and recovery.

    ---

    Use as a skill

    This repository is designed as a portable security knowledge base. It is primarily packaged as a Claude Code skill, but the same SKILL.md + references/ corpus can be loaded into any AI coding assistant. Installation guides for all major tools are below.

    Release channels

  • Compatibility default: v1.0.0 is the last pre-refactor portable snapshot for existing consumers.

  • Preview / refactor line: v2.0.0-rc.1 contains the changes produced by phases 1-6 of the refactor.

  • Working branch: main may mo of both tags during ongoing refactor work.
  • 0. Install with agentskill.sh

    If the assistant supports agentskill.sh, give it this exact instruction:

    agentskill.sh is a third-party skill installer. Review its source before trusting it in CI or on a shared machine.
    The official install paths are documented below.

    1. Clone the repository

    If you want the refactor preview instead, use:

    ---

    Install in Claude Code (CLI / IDE)

    Claude Code loads skills from folders that contain a SKILL.md file. Clone the repository into your personal skills folder:

    In Windows PowerShell 5.1, use $HOME\.claude\skills\security-hardening as the target folder.

    To enable the skill for a single project only, clone it into .claude/skills/security-hardening at the project root instead.

    Start a new Claude Code session. Claude Code loads SKILL.md and reads the references/ files when a security task matches the skill description.

    ---

    Install in Claude on the Web (claude.ai Projects / Skills)

    Claude on the web supports Skills and Projects with attached files.

    Option A - Skills (recommended):

    1. Open claude.ai > Settings > Capabilities > Skills > Create skill.
    2. Name it security-hardening.
    3. Upload SKILL.md and every file under references/ (drag-and-drop the folder).
    4. The skill activates automatically on security questions.

    Option B - Project knowledge:

    1. Create a new Project named "Security Hardening".
    2. In Project knowledge, upload SKILL.md + the references/ folder (zip if needed).
    3. Paste the body of SKILL.md into the Custom instructions field so the model always applies the workflow.

    ---

    Install in Gemini CLI

    Gemini CLI reads context from GEMINI.md files and supports extensions.

    Option A - Project context (per-repo):

    Option B - Global context (all projects):

    Gemini CLI loads GEMINI.md automatically at session start. Reference indi files inline with @.gemini/security-references/appsec/owasp-top10.md.

    ---

    Install in ChatGPT (Custom GPT or Project)

    Option A - Custom GPT (shareable):

    1. Go to chatgpt.com/gpts/editor > Create.
    2. Name: Security Hardening Auditor.
    3. Instructions: paste the contents of SKILL.md.
    4. Knowledge: upload every file under references/ (max 20 files per GPT - if you exceed the limit, zip rarely-used references or split into two GPTs by category).
    5. Capabilities: enable Code Interpreter for log/config parsing.
    6. Save and pin to your sidebar.

    Option B - Project (single account):

    1. Create a new Project in ChatGPT.
    2. Add SKILL.md content as Project instructions.
    3. Upload references/*.md to Project files.
    4. Every chat in that Project will use the security knowledge base.

    ---

    Install in Codex / OpenAI Codex CLI

    Codex CLI reads AGENTS.md files (project-level and global) for persistent instructions.

    Option A - Per-repo:

    Option B - Global (all repos):

    Codex loads AGENTS.md from the working directory and ~/.codex/AGENTS.md globally on every session.

    ---

    Add the CI pipeline to your project

    Copy the GitHub Actions workflow into your own project to get automated security scanning on every push:

    Add the .gitignore template

    Copy-paste defensive AI tool profiles

    The repository now ships ready-to-copy profiles under templates/ai-tool-profiles/ for:

  • Claude Code

  • Codex

  • Gemini CLI

  • Cursor

  • no-code / low-code / automation tools
  • It also ships posture o under templates/ai-tool-profiles/postures/ for:

  • solo

  • startup

  • prod-sensitive

  • gdpr-sensitive
  • Premerged bundles are a under templates/ai-tool-profiles/bundles/ for:

  • claude-code-prod-sensitive

  • cursor-prod-sensitive

  • gemini-cli-prod-sensitive

  • codex-gdpr-sensitive

  • no-code-gdpr-sensitive
  • See references/ai/ai-tool-profiles.md for base-profile selection, bundle selection, and exact copy paths per tool.

    Trigger phrases (any tool)

    Once installed, the skill activates on prompts like:

    Maximum-Protection Quick Start

    If your goal is "defense first", work through the corpus in this order:

    1. references/ops/defensi.md
    2. references/ai/quick-start-ai-coding.md + references/ai/ai-cli-hardening.md
    3. references/ai/ai-ide-no-code-security.md
    4. references/ops/secret-leak-pre.md + references/ops/pre-push-checklist.md
    5. references/privacy/pri.md + references/privacy/gdpr-security-ops.md
    6. references/ai/ai-agent-incident-response.md + references/ops/incident-playbooks.md

    ---

    Table of Contents

  • Core Stance

  • Official Provider Signals Baked Into This Repo

  • Use as a Skill

  • Web Application Security

  • Infrastructure & Configuration

  • Identity & Access Management

  • Platform Security

  • Human Layer

  • Personal / Executi

  • AI / LLM, Agent & MCP Security

  • Privacy and Operations

  • Impro Plan & Audit Tools

  • Automation

  • External References
  • ---

    Web Application Security

    references/appsec/owasp-top10.md


    Quick-reference for the OWASP Top 10 (2021). For each category: what it is, attack examples, and practical fixes.

    Covers: Broken Access Control, Cryptographic Failures, Injection, Insecure Design, Security Misconfiguration, Components, Auth Failures, Integrity Failures, Logging Failures, SSRF.

    references/appsec/database-security.md


    Database hardening patterns: parameterized queries by ORM, Postgres Row-Le (RLS), least-pri application accounts, encryption at rest, backup security, audit logging.

    references/appsec/webhooks-security.md


    Webhook security: HMAC signature (timing-safe compare), replay protection (timestamp + nonce), idempotency keys, retry handling, IP allowlist limitations, secret rotation.

    references/appsec/threat-modeling.md


    Threat modeling methodologies: STRIDE, LINDDUN (privacy), PASTA (risk-centric), Data Flow Diagrams, trust boundaries, abuse cases, threat library, sample workshop agenda.

    references/appsec/api-security.md


    OWASP API Security Top 10 (2023) with code examples for every risk.

    Covers: BOLA/IDOR, BFLA, mass assignment, rate limiting, JSON schema , SSRF, secure error handling, webhook signature , GraphQL depth/complexity limits, pagination security.

    references/appsec/graphql-security.md


    GraphQL security beyond generic API checks.

    Covers: object and field-le, introspection disablement, depth and complexity budgets, alias/batching caps, persisted queries, multipart upload risks, WebSocket subscriptions, telemetry, and N+1 / backend fan-out abuse.

    references/appsec/secure-headers.md


    HTTP security header examples with copy-paste .

    Covers: HSTS, CSP (nonce/hash-based), X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COEP/COOP/CORP, cookie attributes (Secure, HttpOnly, SameSite), CORS, headers to remo blocks for Nginx and Cloudflare Workers.

    references/appsec/browser-security-modern.md


    Modern browser hardening beyond classic headers.

    Covers: Trusted Types, Subresource Integrity (SRI), COOP/COEP/CORP isolation, Permissions Policy, Worker / WebSocket / WASM surfaces, and report-only rollout strategy for legacy frontends.

    references/appsec/language-patterns.md


    Per-language dangerous code patterns with vs. safe alternatives for security audits.

    | Language | Patterns covered |
    |----------|-----------------|
    | Node.js / Ja | Command injection, eval, prototype pollution, path tra, NoSQL injection |
    | Python | Command injection, eval/exec, pickle.loads, path tra, SSTI (Jinja2) |
    | PHP | Command injection, eval, file inclusion, SQL injection, extract() |
    | Go | Template injection, command injection, path tra, SQL injection |
    | Ruby | Command injection, eval/ERB, Marshal.load, mass assignment |
    | Java | SQL injection, XXE, unsafe deserialization |
    | PowerShell | In, command injection, path tra, Con -AsPlainText, TLS bypass, download-and-run, ExecutionPolicy myth, PSScriptAnalyzer rules |
    | Bash / POSIX shell | Word splitting, unquoted $var, missing set -Eeuo pipefail, find/xargs injection, curl \| sh, temp file races, secrets in argv, IFS/PATH tampering, shellcheck rules |

    references/ops/secret-leak-pre.md


    Complete guide to pre, detecting, and responding to secret leaks in Git. Covers every stage: pre-commit blocking, CI scanning, GitHub push protection, incident response (revoke first, then clean history), detection by secret type, frontend special cases, safe-by-design patterns, and a .gitignore security template.

    Includes: per-provider re steps (OpenAI, AWS, GitHub, Stripe, GCP, Slack...), a detection table with regex patterns, frontend-safe key matrix, 8 common leak traps, and secrets manager examples (Vault, AWS Secrets Manager, SOPS, Doppler).

    references/ai/quick-start-ai-coding.md


    Start here if you use AI to write code. 10 things to check before every push, a false-sense-of-security table, what to do when something goes wrong, and a 5-minute security setup for a new project.

    Covers: secret detection, dangerous patterns (e=True/pickle), IDOR pre, password hashing, frontend key safety, error message leaks, input , TLS , dependency audit, and a quick-reference card.

    references/ops/pre-push-checklist.md


    Operational checklist to run in 2 minutes before every git push. Organized by category with copy-paste grep commands for quick scanning.

    Covers: secrets, dangerous patterns, auth/authorization, input/output, sensitive data, dependencies, configuration, and frontend-specific checks.

    references/appsec/production-error-handling.md


    How to handle errors, logs, and config in production without leaking internals.

    Covers: generic error responses with reference IDs, correct HTTP status codes (401 vs 403 vs 404), removing ser, what to log log, log field redaction (Pino, Zap, structlog), startup config (fail-fast if secrets missing), debug mode risks, and CORS error response safety.

    references/ai/.md


    12 common mistakes made by de copy-pasting LLM-generated or Stack O code, with fixes.

    Covers: eval, pickle.loads, shell=True, SHA-256 for passwords, CORS wildcard with credentials, file upload without , logging PII/tokens, disabling TLS , Docker as root, mass assignment, missing rate limiting, trusting frontend for roles.

    ---

    Infrastructure & Configuration

    references/appsec/secure-headers.md


    See Web Application Security above - also includes Nginx hardening block and Cloudflare Workers config.

    references/infra/rate-limiting-infrastructure.md


    Infrastructure rate limiting patterns at the edge, proxy, app, and shared-store layers.

    Covers: Nginx examples, Redis-backed counters, per-route and per-identity quotas, Retry-After, 429 telemetry, proxy trust pitfalls, and abuse-specific limit design for login, OTP, search, uploads, and GraphQL.

    references/infra/iot-ot-security.md


    IoT and OT/Industrial network security.

    Covers: Purdue Model segmentation (IT/OT DMZ), default credential elimination, legacy protocol risks (Modbus, DNP3, BACnet, PROFINET), firmware/patch management, passive OT monitoring, OT-specific incident response (safety-first containment).

    ---

    Identity & Access Management

    references/iam/authorization-rbac.md


    RBAC, ABAC, and ReBAC models with code examples. Deny-by-default pattern and IDOR/BOLA pre.

    Covers: RBAC implementation, ABAC with OPA, ReBAC with OpenFGA, deny-by-default, IDOR/BOLA safe patterns, common anti-patterns (frontend-only check, role from client payload), 404 vs 403 strategy.

    references/iam/session-management.md


    Session management after login, not just authentication at the front door.

    Covers: session rotation after login or pri change, ser in, logout-all-devices, idle and absolute timeouts, fixation pre, refresh-token re, cookie baselines, and concurrent session handling.

    references/iam/webauthn-fido2.md


    WebAuthn / FIDO2 implementation guide for phishing-resistant authentication.

    Covers: RP ID and origin , challenge lifecycle, registration/authentication ceremonies, passkeys, user- defaults, attestation decisions, counter handling, and secure recovery design.

    references/iam/acti.md


    Acti and Entra ID (Azure AD) hardening.

    Covers: Tiering Model (Tier 0/1/2), LAPS, disabling SMBv1 / LLMNR / NTLMv1, Kerberoasting and AS-REP Roasting mitigations, gMSA, Protected Users group, Conditional Access, PIM (just-in-time ele), risky sign-in monitoring. Tools: BloodHound, PingCastle, Purple Knight.

    ---

    Platform Security

    references/platform/mobile-security.md


    OWASP Mobile Top 10 (2024) for iOS and Android, with Swift and Kotlin code examples.

    Covers: Keychain/Keystore secure storage, certificate pinning, cleartext traffic pre, binary protections (ProGuard, obfuscation), root/jailbreak detection, permission least pri, PII in logs, debuggable=false. Tools: MobSF, Frida, objection, Drozer.

    references/platform/desktop-app-security.md


    C/C++, C#/.NET, and Electron application security.

    Covers: Buffer o, format string injection, compiler hardening flags (ASLR, DEP, stack canaries), C# deserialization (BinaryFormatter), XXE, DLL hijacking mitigations, Electron secure configuration (nodeIntegration: false, contextIsolation: true, sandbox: true, IPC ). Tools: Process Monitor, Electronegativity, AddressSanitizer.

    references/platform/endpoint-.md


    Office macros (VBA) and endpoint hardening.

    Covers: Dangerous (Shell, WScript, ADODB), AMSI integration, macro signing, AppLocker/WDAC application whitelisting, Credential Guard, EDR deployment, BitLocker/FileVault, local admin rights removal. Tools: CIS-CAT Lite, OSQuery, Sysinternals Autoruns.

    ---

    Human Layer

    references/ops/social-engineering-physical.md


    Phishing, BEC, , and physical security controls.

    Covers: Email authentication (SPF, DKIM, DMARC p=reject), phishing-resistant MFA (FIDO2/WebAuthn), AiTM bypass risks, simulated phishing (GoPhish), CEO fraud / IBAN change procedures, clean desk policy, badge access control, tailgating pre, MDM remote wipe, security awareness program KPIs.

    ---

    Personal / Executi

    references/ops/defensi.md


    Maximum-protection defensi for de, founders, executives, and small teams.

    Covers: priority account hardening (password manager + FIDO2), separate admin accounts, full-disk encryption, browser/profile separation, safe AI usage, BEC-resistant payment , travel mode, immutable backups, SaaS/SSO hardening, and a 30-minute / 7-day / 30-day rollout plan.

    ---

    AI / LLM & Agent Security

    references/ai/llm-agent-security.md


    OWASP LLM Top 10 (2025) and agentic security controls.

    Covers: Prompt injection (direct and indirect), sensitive data disclosure , excessi, RAG poisoning, secrets in system prompts, agentic action audit logging, tool permission tiers (Level 0-3), output before execution, MCP ser (authentication, tool allowlists, sandboxing), plus official provider signals from OpenAI, Google, and Anthropic including Claude Mythos Preview.

    references/ai/browser-computer-use-security.md


    Dedicated browser / computer-use hardening guide for GUI-driving agents and authenticated click-flow automation.

    Covers: sandbox/, domain allowlists, session hygiene, uploads/downloads, credential entry boundaries, login and publish confirmations, local-OS spillover risk, screenshot/action telemetry, and release gates for browser/computer-use before widening scope.

    references/ai/mcp-security.md


    Dedicated MCP (Model Context Protocol) security reference co the four main attack when giving an AI agent "hands and eyes" tools.

    Covers: Excessi (HITL confirmation patterns, least-pri Docker/ configs, narrow endpoint design), Indirect Prompt Injection via MCP (step-by-step attack chain, LLM-as-a-Judge sanitization, chained-action pre), Ser and malicious manifests (allowlist enforcement, static manifest , supply chain audit), Path Tra and SSRF in MCP tool parameters (Python for read_file and fetch_url, Pydantic schema enforcement, SSRF blocklist with private ranges and AWS IMDS).

    references/ai/rag-retrie.md


    Dedicated RAG / retrie guide for stores, knowledge bases, semantic search, and embedding-backed systems.

    Covers: corpus trust tiers, retrie authorization, attribute filtering, o top-k retrieval, lifecycle and expiration, e deletion gaps, source attribution, document poisoning, and cross-tenant leakage in shared stores.

    references/ai/hostile-corpus-review.md


    Hostile corpus review workflow for untrusted prompts, docs, tickets, MCP output, and copied code.

    Covers: trust tiering, ingest-without-executing, normalization, hidden-instruction stripping, known-bad pattern scanning, fact- separation, quarantine decisions, and before adoption.

    references/ai/ai-cli-hardening.md


    Operational hardening baseline for AI coding CLIs (Claude Code, Codex CLI, Gemini CLI, and similar tools).

    Covers: default-deny permissions, tiered ele model (read-only to high-impact actions), policy-as-code template, prompt/context firewall controls, secret-safe workflows, Git/release integrity controls, CI guardrails, and maturity roadmap by team size.

    references/ai/ai-tool-profiles.md


    Copy-paste defensi map for Claude Code, Codex, Gemini CLI, Cursor, and no-code / low-code tools.

    Covers: exact template paths, posture o, premerged bundle selection, direct copy paths for the repository's conser presets, and links to official documentation used for the field names or behavior.

    references/ai/ai-ide-no-code-security.md


    Security guide for AI IDE assistants, browser builders, and no-code / low-code tools.

    Covers: Cursor-style workspace risks, extension/plugin trust, public preview exposure, connector scope sprawl, ser ownership, prompt/data hygiene, publish gates, exportability, and human review areas that cannot be delegated to the tool.

    references/ai/agent-e.md


    Defensin guide for agentic systems before rollout or after model, tool, or permission changes.

    Covers: release-gate design, hostile-fixture families, excessi checks, MCP/tool abuse scenarios, telemetry expectations, regression metrics, and how to turn incidents or near misses back into standing e.

    references/ai/ai-agent-incident-response.md


    Incident response playbook dedicated to AI agents and MCP-enabled workflows.

    Covers: se model, first 15-minute containment steps, e collection, timeline reconstruction, blast radius analysis, eradication/recovery, communication template, and post-incident hardening actions specific to agentic systems.

    ---

    Privacy and Operations

    references/privacy/gdpr-security-ops.md


    Operational GDPR / RGPD security guide mapping Articles 5/25/28/30/32/33/35 and transfer controls to engineering and security actions.

    Covers: data in, RoPA, technical and organizational measures, DPA / SCC / TIA checks, breach notification timeline, DSAR/delete/export workflows, e pack for audits, and common red flags.

    references/privacy/pri.md


    Privacy by design - how to stop leaking PII through logs, errors, exports, and analytics.

    Covers: PII categories and what counts as sensitive in logs, structured log redaction (Pino redact, Zap custom fields, Python logging), automated log scanning for PII patterns, retention policy template per data category (logs 90d, transactions 7y, sessions TTL), scheduled anonymization/deletion jobs (Django + SQL), GDPR right to erasure implementation (multi-system erasure service), PII in exception reporting (Sentry send_default_pii=False, scrubbing hook), sensitive data in support dumps and backups (encryption), analytics data minimization (userId only, no email/phone), session recording masking (FullStory, LogRocket, Hotjar).

    references/ops/.md


    management process from scanner output to closed finding - triage, SLA, false positives, risk acceptance.

    Covers: lifecycle diagram, finding sources and signal quality (SAST/SCA/DAST/secrets), se classification with context adjustment rules (internet-facing = bump up, auth required = bump down), SLA table (Critical 24h, High 7d, Medium 30d, Low 90d), triage decision tree (reachable? exploitable? blast radius? mitigating controls?), triage outcome classification (fix/accept/false positive/not applicable/compensating control), false positi with in-code suppression justification (nosemgrep/noqa with mandatory comment), risk acceptance template (expiry, dual approval, compensating controls), compensating controls per type, metrics dashboard (MTTR, SLA compliance rate, recurring types), dependency reachability analysis (go, tri).

    ---

    Impro Plan & Audit Tools

    references/ops/security-impro.md


    Structured 7-axis defense-in-depth impro plan with quick wins and long-term actions per axis. Sources: OWASP, NIST 800-53/800-63B, CIS Benchmarks.

    Axes: code security, authentication, infrastructure, supply chain, CI/CD De, monitoring/incident response, offensi.

    references/ops/detection-engineering.md


    Detection engineering starter pack for app, identity, GraphQL, AI, cloud, and supply-chain abuse.

    Covers: Sigma-style rules, threshold guidance, required log sources, and example detections for credential stuffing, token replay, IDOR/BOLA, GraphQL introspection or alias abuse, IMDS probing, suspicious AI tool sequences, Kubernetes secret/exec abuse, and CI/CD tampering.

    references/appsec/frontend-frameworks-security.md


    Security risks specific to modern SPA and SSR frameworks (React, Next.js, Vue, Nuxt) beyond classic OWASP XSS co.

    Covers: SSR data leaks - __NEXT_DATA__ exposes full DB objects in HTML (audit command, fix pattern for getSer / useAsyncData / RSC), DOM-based XSS in React (dangerouslySetInnerHTML + DOMPurify, ja: href injection) and Vue (), Prototype Pollution (attack chain via __proto__, lodash/jQuery/qs , Object.freeze and structuredClone mitigations), client-side secret exposure (NEXT_PUBLIC_ trap, bundle audit), CSRF in SPAs (double-submit cookie pattern), nonce-based CSP with Next.js middleware.

    references/infra/supply-chain-security.md


    Software supply chain security from code to production. Covers the attack surfaces exposed by SolarWinds, Log4Shell, and the XZ Utils backdoor.

    Covers: SLSA framework (levels 0-3, requirements table, GitHub Actions pro workflow with slsa-github-generator), SBOM generation (Syft and Trivy, SPDX and CycloneDX, CI attachment, CVE scan against SBOM), Dependency Confusion attack and mitigations (npm scoped packages, pip --index-url vs --extra-index-url, hash pinning), Cosign/Sigstore keyless image signing and , gitsign for commit signing, GitHub Actions hardening (commit SHA pinning, OIDC instead of static keys, minimal permissions per job), dependency scanning (npm audit, pip-audit, go, OpenSSF Scorecard).

    references/appsec/applied-cryptography.md


    Algorithm selection and copy-paste code examples for de who need to make cryptographic decisions. Covers the most common mistakes (CWE-916, CWE-327, CWE-338).

    Covers: password hashing (Argon2id vs MD5 - why fast hashes are wrong), authenticated encryption (AES-256-GCM and ChaCha20-Poly1305 with encrypt/decrypt examples in Python/Node.js/Go), asymmetric algorithm selection table (Ed25519, ECDSA P-256, RSA), TLS 1.3 configuration, CSPRNG usage (secrets, crypto.randomBytes, crypto/rand), HMAC hash, quick reference table (use case / recommended / never use), CWE mapping for 8 common crypto mistakes.

    references/compliance/cwe-owasp-mapping.md


    Cross-reference table linking CWE, OWASP Top 10, OWASP AS, code patterns, and SAST tool/rule for automated detection.

    Covers: injection, authentication, access control, cryptography, secrets, supply chain. Includes quick tool command reference (Semgrep, Bandit, Gosec, Gitleaks, Tri ZAP).

    references/compliance/compliance-mapping.md


    Compliance crosswalk linking the repo guidance to e expectations.

    Covers: high-le toward SOC 2, ISO 27001:2022, PCI-DSS v4.0, HIPAA, GDPR/RGPD, NIS2, and DORA, plus the e types auditors usually expect for technical and organizational controls.

    references/ops/security-audit-levels.md


    Progressi framework from solo de to expert review. Tells you exactly where to start, what to check at each level, how long it takes, which tools to use, and when to move to the next level.

    | Level | For who | Time | Key focus |
    |-------|---------|------|-----------|
    | 1 | Solo dev / MVP | 30-90 min | Secrets, deps, basic headers, dangerous patterns |
    | 2 | Live app with users | Half-day to 1 day | IDOR, input , CORS, rate limiting |
    | 3 | Production SaaS / team | 1-3 days | AuthZ model, supply chain, infra hardening, detection |
    | 4 | Regulated / critical | Days to weeks | Threat model, pentest, fuzzing, red team |

    Also includes a co matrix linking every reference file in this repo to its audit level(s).

    references/appsec/security-testing-examples.md


    Executable security tests ready to add to your test suite. Failing tests mean the security control is missing.

    Covers (pytest, Jest, Go): IDOR/authorization, rate limiting, GraphQL introspection/depth/alias/authz checks, file upload (extension, MIME, size, path tra, SVG XSS), SSRF (localhost, AWS metadata, private ranges), error handling (no stack trace, reference ID), security headers, webhook signature . Includes OWASP ZAP Docker baseline scan.

    references/iam/cloud-iam-hardening.md


    AWS, GCP, and Azure hardening with audit commands and copy-paste configurations.

    Covers: IAM least pri, no wildcard policies, MFA enforcement, S3/GCS/Blob public access pre, Secrets Manager usage, IMDSv2 (SSRF protection on EC2), CloudTrail audit logging, CI/CD OIDC (no long-lived keys), IaC scanning (Checko).

    references/infra/container-k8s-hardening.md


    Docker and Kubernetes hardening from Dockerfile to cluster admission policies.

    Covers: non-root Dockerfiles, multi-stage builds, read-only filesystems, Tri scanning, K8s Pod Security Standards, network policies (default-deny), Secrets Secrets Operator or Vault, RBAC minimal roles, Kyverno admission policies, Cosign image signing.

    references/ops/incident-playbooks.md


    Step-by-step response procedures for the 6 most common security incidents.

    Playbooks: compromised user account, webhook/integration token compromise, JWT signing secret leaked, cloud storage bucket exposed, errors/debug mode in production, CORS misconfiguration. Each follows Detect - Contain - In - Remediate - Review. Includes postmortem template.

    references/compliance/co.md


    O of all reference files: depth, priority, audit level, review frequency, and automation a. Includes co gaps backlog.

    references/appsec/security-myths.md


    11 common misconceptions with explanation and fix: WAF as sole defense, SHA-256 for passwords, "JWT = security", CORS protecting APIs, secrets in .en being sufficient, no rate limiting, security through obscurity, OAuth misuse, Docker isolation, code review alone.

    references/appsec/framework-examples.md


    Copy-paste security configurations per framework: headers, JWT auth middleware, input , rate limiting, safe error handling, IDOR-safe DB queries.

    Covers: Express, NestJS, FastAPI, Django, Laravel, Spring Boot, Go (Gin).

    ---

    Automation

    .github/workflows/security.yml


    GitHub Actions security pipeline running on every push and PR - copy this into any project.

    Jobs: Gitleaks (secret scanning), Semgrep (SAST), Tri scan (dependency CVEs, blocks on CRITICAL/HIGH), Syft SBOM generation (artifact upload), Dependency Review (blocks PRs introducing deps).

    .github/pull_request_template.md


    Security checklist enforced on every PR before review.

    Sections: input/output , authentication & authorization, privacy / GDPR, secrets & sensitive data, AI / automation, dependencies, network & API, code quality.

    .github/dependabot.yml


    Keeps pinned GitHub Actions dependencies fresh with controlled update PRs.

    .github/CODEOWNERS


    Provides a review boundary for sensiti paths.

    ---

    External References

    | Standard / Tool | Link |
    |----------------|------|
    | OWASP Top 10 | |
    | OWASP API Security Top 10 | |
    | OWASP Mobile Top 10 | |
    | OWASP LLM Top 10 | |
    | OWASP ASVS | |
    | OWASP Secure Headers | |
    | NIST SP 800-82 Rev 3 (OT) | |
    | NIST SP 800-63B (Auth) | |
    | CIS Benchmarks | |
    | MITRE ATT&CK for ICS | |
    | MITRE ATLAS (AI/ML) | |
    | OpenAI - Trusted Access for Cyber | |
    | Google - SAIF Risk Assessment | |
    | Google - A summer of security: empowering cyber defenders with AI | |
    | Anthropic - Project Glasswing | |
    | Anthropic - Model system cards | |
    | Anthropic - Responsible Scaling Policy | |
    | Mozilla Obser | |
    | CISA ICS Ad | |

    项目信息

    开发语言:Python

    Star 数:3

    技术要点

    该项目属于防护思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Portable defensive application security and AI-agent security skill for Claude Code, Codex, Gemini, and ChatGPT. Covers OWASP, secure design, secure code review, MCP security, prompt injection, threat modeling, incident response, and hardening.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。

    从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。

    使用与学习建议

    1. 下载源码压缩包,解压到本地环境。

    2. 根据项目类型准备对应的运行环境与依赖。

    3. 按照 README 中的步骤完成配置与部署。

    4. 在隔离的测试环境中运行验证,避免影响生产系统。

    免责声明

    本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。

    资源标题security-hardening - Portable defensive application security and AI-age
    所属分类防护思路
    发布作者admin
    发布时间2026-10-06 00:17:10
    下载权限 免费下载
    附件数量2 个下载链接
    浏览次数259
    讨论数量0
    主题状态正常讨论中

    本资源免费,登录后即可在本页「下载链接」区域获取全部附件。

    请在评论区留言说明具体链接,或联系作者补档。楼主更新后本页会同步最新的下载地址。

    请先阅读正文中的授权说明;未注明的默认仅限站内学习交流,禁止直接搬运到其他站点二次售卖。
    还没有讨论,快来抢沙发~
    登录 后才能参与讨论
    下载链接
    会员才能下载
    登录后开通会员
    同分类推荐
    暂无同类资源
    免费登录即可下载
    查看会员
    放大预览

    © 2026 剑庭安 - 网站开发定制 SEO 优化蜘蛛池代做 在线看手相算命. 保留所有权利。

    Powered by 酷像SEOv3.0

    网站地图 Sitemap.xml
    首页 全部分类 黑客安全 逆向|反编译 精品源码 站长工具自助开通会员其他资源SEO工具站群源码泛程序蜘蛛模板蜘蛛池外链工具创意乐园 搜索 会员服务 登录 注册