Skillpedia
النشر والسحابة (DevOps)35k · #8047

implementing-github-advanced-security-for-code-scanning

ما الذي تفعله

تساعد هذه المهارة على إعداد GitHub Advanced Security، وهو نظام يفحص شيفرتك بحثًا عن الثغرات الأمنية والأسرار المسربة. يعمل ذلك تلقائيًا، فلا تحتاج إلى فحص كل شيء يدويًا.

متى تستخدمها

  • ✓عندما تضبط أمان الشيفرة لمشاريعك لأول مرة.
  • ✓عندما تريد أن يجد GitHub المشكلات الأمنية تلقائيًا.
  • ✓عندما تدير أمان مشاريع كثيرة في وقت واحد.

رابط المهارة

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-github-advanced-security-for-code-scanning/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-github-advanced-security-for-code-scanning/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“اضبط فحص GitHub Advanced Security لكل مستودعاتي.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تفعّل هذه الميزة من إعدادات GitHub. يمكن ضبطها بنقرة واحدة، أو بطريقة متقدمة تتيح لك تخصيص طريقة الفحص وتوقيته.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Implementing GitHub Advanced Security for Code Scanning

Overview

GitHub Advanced Security (GHAS) integrates CodeQL-powered static application security testing directly into the GitHub development workflow. CodeQL treats code as data, enabling semantic analysis that identifies security vulnerabilities such as SQL injection, cross-site scripting, buffer overflows, and authentication flaws with significantly fewer false positives than traditional pattern-matching scanners. GHAS encompasses code scanning, secret scanning, dependency review, and Dependabot alerts to provide a comprehensive security posture for repositories.

When to Use

  • When deploying or configuring implementing github advanced security for code scanning capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • GitHub Enterprise Cloud or GitHub Enterprise Server 3.0+ with GHAS license
  • Repository admin or organization owner permissions
  • Familiarity with GitHub Actions workflow syntax (YAML)
  • Supported languages: C/C++, C#, Go, Java/Kotlin, JavaScript/TypeScript, Python, Ruby, Swift

Core Concepts

CodeQL Analysis Engine

CodeQL compiles source code into a queryable database, then executes security-focused queries against that database. The query suites ship with hundreds of checks mapped to CWE identifiers and cover OWASP Top 10, SANS Top 25, and language-specific vulnerability patterns. Custom queries can be authored using the CodeQL query language (QL) to detect organization-specific anti-patterns.

Default Setup vs. Advanced Setup

Default Setup enables code scanning with a single click from the repository's Code Security settings. GitHub automatically determines the languages present, selects appropriate query suites, and configures scanning triggers. This approach requires no workflow file and is ideal for rapid onboarding.

Advanced Setup generates a .github/workflows/codeql.yml workflow file that can be customized. Teams control scheduling, language matrices, build commands for compiled languages, additional query packs, and integration with third-party SARIF producers. Advanced setup is required when custom build steps, monorepo configurations, or private query packs are needed.

Organization-Wide Rollout

For enterprises managing hundreds of repositories, GHAS supports configuring code scanning at scale using the organization-level security overview. Administrators can enable default setup across all eligible repositories, define custom security configurations, and monitor adoption through the security coverage dashboard.

Workflow

Step 1 --- Enable GHAS on the Organization

  1. Navigate to Organization Settings > Code security and analysis
  2. Enable GitHub Advanced Security for all repositories or selected repositories
  3. Confirm license seat allocation (GHAS is billed per active committer)

Step 2 --- Configure Default Setup for Quick Wins

  1. Go to Repository Settings > Code security > Code scanning
  2. Click "Set up" in the CodeQL analysis row and select "Default"
  3. Review the auto-detected languages and query suite (default or extended)
  4. Click "Enable CodeQL" to activate scanning on push and pull request events

Step 3 --- Advanced Setup with Custom Workflow

Create .github/workflows/codeql-analysis.yml:

name: "CodeQL Analysis"

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]
  schedule:
    - cron: '30 2 * * 1'  # Weekly Monday 2:30 AM UTC

jobs:
  analyze:
    name: Analyze (${{ matrix.language }})
    runs-on: ubuntu-latest
    permissions:
      security-events: write
      contents: read
      actions: read

    strategy:
      fail-fast: false
      matrix:
        language: ['javascript-typescript', 'python', 'java-kotlin']

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v3
        with:
          languages: ${{ matrix.language }}
          queries: +security-extended,security-and-quality
          # For compiled languages, add build commands below

      - name: Autobuild
        uses: github/codeql-action/autobuild@v3

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v3
        with:

…
الأسئلة الشائعة

ما هو CodeQL؟

CodeQL تقنية تعامل شيفرتك كبيانات، لتجد المشكلات الأمنية بذكاء أكبر وبأخطاء أقل.

ما الفرق بين الإعداد الافتراضي والإعداد المتقدم؟

الإعداد الافتراضي أبسط وأسرع. والإعداد المتقدم يتيح مزيدًا من التخصيص، مثل تحديد أوقات معينة للفحص أو إضافة فحوص مخصصة.

هل يجب أن أدفع مقابل هذه الميزة؟

نعم، تتطلب GitHub Advanced Security ترخيصًا، ويُحتسب سعرها حسب عدد المساهمين النشطين.

التفاصيل

الوصف الأصلي من المؤلف

Configures GitHub Advanced Security (code scanning with CodeQL, secret scanning, dependency review, and Dependabot alerts) to perform automated static analysis and vulnerability detection across repositories at enterprise scale, including custom CodeQL queries and CI workflow integration. Use when setting up or tuning code scanning, rolling out CodeQL across an organization, or shifting SAST left

repo: mukul975/Anthropic-Cybersecurity-Skills

الشعبية

نجوم GitHub
35k
الترتيب
#8047
الترخيص
Apache-2.0
آخر تحديث
31‏/8‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة