تخطَّ إلى المحتوى
إضافةمستورديحتوي سكربتاتترخيص مشاركة بالمثل

insecure-defaults

Detects insecure default configurations including hardcoded credentials, fallback secrets, weak authentication defaults, and dangerous values in production

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

اقرأ هذا قبل أن تنزّل

لا يشغّل تلقين أي شيء من هذا العنصر. لكن ما تنزّله يعمل على جهازك إن شغّلته أنت أو سمحت لكلود كود بتشغيله، فاقرأ الملفات أولاً.

  • في العنصر ملفات سكربت.

الملفات: 20 · الحجم: 145 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

تُثبَّت الإضافات من سوق الإضافات في كلود كود، لا بنسخ الملفات. نزّل الحزمة لتقرأ محتواها وترخيصها.

التعليمات

Insecure Defaults Detection

Audits a codebase for insecure default configuration, tracing each candidate before reporting it.

Install

/plugin install insecure-defaults            # marketplace
/plugin install ./plugins/insecure-defaults  # local checkout

Use

/insecure-defaults:audit                      # whole repo
/insecure-defaults:audit src/                 # subtree
/insecure-defaults:audit src/config/app.py    # one file

Argument is a file or a directory. Optional; defaults to ..

Whatever you point at is the target, however test-like it looks: a run scoped to tests/ audits the tests. Exclusions (fixtures, docs, vendored code) apply only outside the scope you named.

Use the command, not the workflow. Invoking insecure-defaults:audit-pipeline directly stops immediately. No fallback: if the corpus can't be read, the run errors rather than guessing.

What it finds

CategoryExampleCorpus
Fallback secretsSECRET = env.get('KEY') or 'dev'fallback-secrets.md
Default credentialsseeded admin / admin123default-credentials.md
Fail-open switchesgetenv('REQUIRE_AUTH', 'false')fail-open-security.md
Weak cryptohashlib.md5(password)weak-crypto.md
Permissive accessACL='public-read', 0o666, CORS *permissive-access.md
Debug leakagetraceback.format_exc() in a responsedebug-features.md

Each category is three files that must agree:

workflows/audit.jsan { id, title } row, all the script knows. Ships as /insecure-defaults:audit-pipeline
references/<id>.jsontitle + seed patterns
references/<id>.mdReport when / Skip when, plus worked vulnerable/secure pairs

The sweep agent loads both files for its own category and no others. It has to be the agent, not the script: a workflow has no filesystem access. tests/seed-coverage.js checks the three correspond, since nothing at runtime can.

Candidates come in two shapes, judged differently:

  • Configurable: a lookup with a fallback. Only a bug if the app runs with it. env.get('K', 'x') does; env['K'] crashes instead, so it's fine.
  • Unconditional: no configuration anywhere, insecure as written. About half of all findings. A missing env var is not grounds to refute one.

How it runs

PhaseAgentsModelDoes
Recon1SonnetClassify scope, profile stack + deploy manifests
Discover6SonnetOne sweep per category, in parallel
VerifyNOpusRefuting agents batched by category, ≤16 findings each
Report1SonnetSeverity, remediation, coverage

Between Discover and Verify: dedup keyed on category:file:line, so the rule id prefixes the path. Two patterns in one category hitting the same line collapse; the same line flagged by two different categories stays as two candidates. hashlib.md5(k) can be a real weak-crypto finding and a false permissive-access match at once, and one merged verdict would have to cover both readings.

Verify then batches by category, ≤16 findings per agent. Each agent reads exactly one corpus and applies one discriminator. A category with more than 16 findings is split across several agents, so no single agent can run past the tool-call cap and return a partial verdict list. Coverage is uncapped; only per-agent size is.

Sweeps collect and don't judge: a sweep only greps, so it files candidates without classifying them and the verifier decides with the file in context. Each verifier starts at refuted: true and stops at the first step that kills a candidate:

  1. Is the file reachable in production?
  2. Is the insecure value the one that runs? Configurable → does it fail-secure instead? Unconditional → this step can't refute it.
  3. Is the value actually insecure?
  4. Does it reach a security decision? Cite the sink.
  5. Does deployment always supply the var? Configurable only, and no answer refutes: every manifest setting it lowers severity, none is the CRITICAL case, and a partial or undetermined answer counts as reachable.

Incomplete trace = refuted. If the corpus can't be found, the run aborts rather than continuing without it.

Each sweep reports whether it could actually read its corpus, and one failure aborts the run.

Patterns

Seed patterns are a floor, not the search.

Recon reports the project's own config wrappers, flagged if they can return a default. Each sweep then derives patterns for the detected stack: framework keys, language idioms (ENV.fetch, System.getProperty(k, d), ${VAR:-default}), and manifest formats (default = in HCL, ENV in a Dockerfile). A codebase reading everything through get_setting("X", "default") barely matches the generic seeds.

Sweeps report seed patterns and derived patterns separately. Any sweep whose derived list is empty only looked for generic idioms, and is named in the report as a coverage gap.

Seeds are POSIX ERE: [[:space:]] and [0-9], never \s, \d or \b. Some grep builds silently fail to match those, and a pattern that matches nothing is indistinguishable from a clean result. tests/seed-coverage.js rejects them.

To add a category: a row in CATEGORIES in workflows/audit.js, plus <id>.json and <id>.md in references/.

When not to use it

  • Semgrep or a linter fits better: fixed pattern, no reachability question.
  • You want extensive secret detection: use gitleaks/trufflehog for committed credentials.

Tests

node tests/harness.js workflows/audit.js
node tests/harness.js workflows/audit.js --self-test
node tests/seed-coverage.js .

Details in tests/README.md. Whether the prompts work on a real model needs a live run.

الملفات

  • مجلد.claude-plugin367 بايت
    • plugin.json367 بايت
  • مجلدcommands1.4 ك.ب
    • audit.md1.4 ك.ب
  • مجلدreferences17 ك.ب
    • debug-features.json777 بايت
    • debug-features.md2.3 ك.ب
    • default-credentials.json723 بايت
    • default-credentials.md2.2 ك.ب
    • fail-open-security.json686 بايت
    • fail-open-security.md2 ك.ب
    • fallback-secrets.json522 بايت
    • fallback-secrets.md2.1 ك.ب
    • permissive-access.json720 بايت
    • permissive-access.md2.2 ك.ب
    • weak-crypto.json794 بايت
    • weak-crypto.md2.1 ك.ب
  • مجلدtests65 ك.بسكربت
    • README.md7.1 ك.ب
    • harness.js51 ك.بسكربت
    • run_seeds.sh811 بايتسكربت
    • seed-coverage.js6.6 ك.بسكربت
  • مجلدworkflows35 ك.بسكربت
    • audit.js35 ك.بسكربت
  • LICENSE20 ك.ب
  • README.md6.6 ك.ب

ما وجده الفحص الآلي

فحصنا الملفات آلياً وقت الاستيراد. هذا ما نبّه إليه الفحص، ولا يعني أن العنصر ضار ولا أنه سليم: اقرأه بنفسك.

  • يحتاج مراجعةملف سكربت

    في الملف plugins/insecure-defaults/tests/harness.js

  • يحتاج مراجعةتعمية أو تقييم ديناميكي للنص

    في الملف plugins/insecure-defaults/tests/harness.js، السطر 41

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • إضافةمستورد

    blockchain-web3

    Smart contract development with Solidity, DeFi protocol implementation, NFT platforms, and Web3 application architecture

    MITالملفات: 11

  • إضافةمستورد

    building-secure-contracts

    Comprehensive smart contract security toolkit based on Trail of Bits' Building Secure Contracts framework. Includes vulnerability scanners for 6 blockchains and 5 development guideline assistants.

    CC-BY-SA-4.0الملفات: 58

  • إضافةمستورديحتوي سكربتات

    burpsuite-project-parser

    Search and extract data from Burp Suite project files (.burp) for security analysis

    CC-BY-SA-4.0الملفات: 8

  • إضافةمستورديحتوي سكربتات

    c-review

    Comprehensive C/C++ security code review, with coverage verified against a parse of the source

    CC-BY-SA-4.0الملفات: 24

  • إضافةمستورد

    claude-md-management

    Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.

    Apache-2.0الملفات: 10

  • إضافةمستورد

    comprehensive-review

    Multi-perspective code analysis covering architecture, security, and best practices

    MITالملفات: 6