
📦 :octocat: एक GitHub Action जो आपके GitHub Actions की सुरक्षा जाँच करता है।
एक GitHub Action जो आपके GitHub actions की सुरक्षा स्कैन करता है।
यह action octoscan पर आधारित है।
इस action का उपयोग कैसे करें इसका एक बुनियादी उदाहरण यहाँ दिया गया है। यह push और pull_request दोनों इवेंट्स के लिए काम करेगा।
---
name: Octoscan
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/*'
push:
paths:
- '.github/workflows/*'
permissions:
security-events: write
actions: read
contents: read
jobs:
octoscan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: octoscan
name: Run octoscan
uses: synacktiv/action-octoscan@v1
- name: Upload SARIF file to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "${{steps.octoscan.outputs.sarif_output}}"
category: octoscan
सुरक्षा परिणामों को कोड सुरक्षा टैब में समीक्षा की जा सकती है यदि आपके पास लक्षित रिपॉजिटरी पर लेखन पहुँच है:

या सीधे पुल रिक्वेस्ट में:

Inputs, octoscan के विकल्पों पर आधारित हैं, आप उन्हें यहाँ पा सकते हैं।
निम्नलिखित step.with कुंजियों के रूप में वैकल्पिक हैं:
💡 एक ही समय में enable_rules और disable_rules का उपयोग करना संभव नहीं है।
निम्नलिखित आउटपुट को इस action से ${{ steps.<step-id>.outputs }} के माध्यम से एक्सेस किया जा सकता है।
| Name | Type | Description |
|---|---|---|
sarif_output | String | sarif आउटपुट वाली फ़ाइल का नाम। |
इस Action को GitHub इंटीग्रेशन टोकन पर निम्नलिखित अनुमतियों की आवश्यकता होती है:
permissions:
security-events: write
actions: read
contents: read
security-events का उपयोग octoscan के आउटपुट को GitHub कोड स्कैनिंग में पुश करने के लिए किया जाता है।
| Name | Type | Description |
|---|
workdir | String | रूट निर्देशिका के सापेक्ष कार्य निर्देशिका। |
filter_triggers | String | विशिष्ट ट्रिगर्स के साथ वर्कफ़्लो स्कैन करें (अल्पविराम से अलग की गई सूची: "push,pull_request_target" या पूर्व-कॉन्फ़िगर: external/allnopr)। डिफ़ॉल्ट external है। |
filter_run | Boolean | केवल रन शेल स्क्रिप्ट्स में एक्सप्रेशन इंजेक्शन खोजें। डिफ़ॉल्ट true है |
ignore | String | उन त्रुटि संदेशों से मेल खाने वाला रेगुलर एक्सप्रेशन जिन्हें आप अनदेखा करना चाहते हैं। |
disable_rules | String | विशिष्ट नियमों को अक्षम करें। "," पर विभाजित करें। enable_rules के साथ उपयोग नहीं किया जा सकता। |
enable_rules | String | विशिष्ट नियमों को सक्षम करें, यह अन्य सभी नियमों को अक्षम कर देगा। "," पर विभाजित करें। disable_rules के साथ उपयोग नहीं किया जा सकता। |