{"id":25864920,"url":"https://github.com/stackloklabs/bandit-action","last_synced_at":"2025-03-02T01:31:07.160Z","repository":{"id":224974240,"uuid":"764727160","full_name":"StacklokLabs/bandit-action","owner":"StacklokLabs","description":"Official GitHub Action for the Bandit Security Scanner","archived":false,"fork":false,"pushed_at":"2024-03-02T19:23:32.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-02T20:31:25.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StacklokLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-28T15:52:04.000Z","updated_at":"2024-02-28T15:52:35.000Z","dependencies_parsed_at":"2024-03-02T20:31:05.336Z","dependency_job_id":null,"html_url":"https://github.com/StacklokLabs/bandit-action","commit_stats":null,"previous_names":["stackloklabs/bandit-action"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fbandit-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fbandit-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fbandit-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fbandit-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StacklokLabs","download_url":"https://codeload.github.com/StacklokLabs/bandit-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241447351,"owners_count":19964312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-02T01:31:06.274Z","updated_at":"2025-03-02T01:31:07.150Z","avatar_url":"https://github.com/StacklokLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action for Bandit\n\nThis GitHub Action runs [Bandit](https://bandit.readthedocs.io/en/latest/), a \ntool designed to find common security issues in Python code, against a Python \ncodebase.\n\n## Features\n\n- :gear: Fully configurable with input parameters and support for config files.\n- :speech_balloon: Posts scan results as a comment on pull requests.\n\n## Inputs\n\n| Name                 | Description                                                 | Default |\n|----------------------|-------------------------------------------------------------|---------|\n| `recursive`          | Find and process files in subdirectories.                   | `false` |\n| `aggregate`          | Aggregate output by vulnerability or by filename.           | `vuln`  |\n| `context_lines`      | Maximum number of code lines to output for each issue.      |         |\n| `config_file`        | Optional config file to use for selecting plugins.          |         |\n| `profile`            | Profile to use, defaults to executing all tests.            |         |\n| `tests`              | Comma-separated list of test IDs to run.                    |         |\n| `skips`              | Comma-separated list of test IDs to skip.                   |         |\n| `severity_level`     | Report only issues of a given severity level or higher.     | `low`   |\n| `confidence_level`   | Report only issues of a given confidence level or higher.   | `low`   |\n| `verbose`            | Output extra information like excluded and included files.  | `false` |\n| `debug`              | Turn on debug mode.                                         | `false` |\n| `quiet`              | Only show output in the case of an error.                   | `false` |\n| `ignore_nosec`       | Do not skip lines with `# nosec` comments.                  | `false` |\n| `exclude_paths`      | Comma-separated list of paths to exclude from scan.         |         |\n| `baseline`           | Path of a baseline report to compare against.               |         |\n| `ini_path`           | Path to a `.bandit` file that supplies command line args.   |         |\n| `exit_zero`          | Exit with 0 even with results found.     \n\n| :memo:        | We do not expose args for output/format,message_template, as we need to hardcore the report for the PR comment feature|\n|---------------|:----------------------------------------------------------------------------------------------------------------------|\n\n## Usage\n\nTo use the action, add the following to your GitHub workflow file (e.g. `.github/workflows/bandit.yml`:\n\n### Basic Example\n\n```yaml\nname: Bandit Code Scan\n\non:\n  pull_request:\n    branches: [ main ]\n\npermissions:\n  pull-requests: write\n\njobs:\n  bandit-action:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n    - name: Run Bandit Scan\n      uses: ./\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      with:\n        path: \".\"\n        exit_zero: \"true\"\n        recursive: \"true\"\n```\n\n```yaml\nname: Bandit Code Scan\n\non: [push, pull_request]\n\npermissions:\n  pull-requests: write\n\njobs:\n  bandit-action:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n    - name: Run Bandit Scan\n      uses: ./\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      with:\n        path: \".\"\n        exit_zero: true\n        recursive: true\n        aggregate: vuln\n        context_lines: 3\n        config_file: .bandit\n        profile: bandit\n        tests: B101,B102\n        skips: B101\n        severity_level: low\n        confidence_level: low\n        verbose: true\n        debug: true\n        quiet: false\n        ignore_nosec: false\n        exclude_paths: tests,docs\n        baseline: baseline.json\n        ini_path: .bandit\n        exit_zero: false\n```\n\n## Contributing\n\nIf you would like to contribute to this project, please open an issue or a pull request.\n\n## License\n\nThis GitHub Action is distributed under the Apache License, Version 2.0, see [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Fbandit-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackloklabs%2Fbandit-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Fbandit-action/lists"}