All Projects → victoriadrake → django-security-check

victoriadrake / django-security-check

Licence: MIT License
Helps you continuously monitor and fix common security vulnerabilities in your Django application.

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to django-security-check

Purify
All-in-one tool for managing vulnerability reports from AppSec pipelines
Stars: ✭ 72 (+4.35%)
Mutual labels:  security-audit, security-automation, devsecops
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+62.32%)
Mutual labels:  continuous-integration, devsecops, github-actions
Faraday
Faraday introduces a new concept - IPE (Integrated Penetration-Test Environment) a multiuser Penetration test IDE. Designed for distributing, indexing, and analyzing the data generated during a security audit.
Stars: ✭ 3,198 (+4534.78%)
Mutual labels:  security-audit, security-automation, devsecops
Sbt Dependency Check
SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). 🌈
Stars: ✭ 187 (+171.01%)
Mutual labels:  security-audit, security-automation, devsecops
github-create-release-action
Github Action that create Github Release automatically
Stars: ✭ 28 (-59.42%)
Mutual labels:  continuous-integration, github-actions
advanced-security-compliance
GitHub Advance Security Compliance Action
Stars: ✭ 106 (+53.62%)
Mutual labels:  security-automation, devsecops
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (-46.38%)
Mutual labels:  continuous-integration, github-actions
arduino-lint-action
GitHub Actions action to check Arduino projects for problems
Stars: ✭ 20 (-71.01%)
Mutual labels:  continuous-integration, github-actions
docker-wallarm-node
⚡️ Docker official image for Wallarm Node. API security platform agent.
Stars: ✭ 18 (-73.91%)
Mutual labels:  security-audit, security-automation
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-81.16%)
Mutual labels:  continuous-integration, github-actions
lychee-action
Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.
Stars: ✭ 89 (+28.99%)
Mutual labels:  continuous-integration, github-actions
reconmap
Vulnerability assessment and penetration testing automation and reporting platform for teams.
Stars: ✭ 242 (+250.72%)
Mutual labels:  security-automation, devsecops
sonarqube-action
Integrate SonarQube scanner to GitHub Actions
Stars: ✭ 90 (+30.43%)
Mutual labels:  devsecops, github-actions
cake-build
Demonstrates a basic build of a .NET NuGet package using https://cakebuild.net/
Stars: ✭ 22 (-68.12%)
Mutual labels:  continuous-integration, github-actions
bump-everywhere
🚀 Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.
Stars: ✭ 24 (-65.22%)
Mutual labels:  continuous-integration, github-actions
mist
Create complex tools execution Workflows for working together
Stars: ✭ 21 (-69.57%)
Mutual labels:  continuous-integration, security-automation
drupal9ci
One-line installers for implementing Continuous Integration in Drupal 9
Stars: ✭ 137 (+98.55%)
Mutual labels:  continuous-integration, github-actions
Sherlock
This script is designed to help expedite a web application assessment by automating some of the assessment steps (e.g., running nmap, sublist3r, metasploit, etc.)
Stars: ✭ 36 (-47.83%)
Mutual labels:  security-audit, security-automation
demo-ci
Aula prática sobre servidores de Integração Contínua
Stars: ✭ 15 (-78.26%)
Mutual labels:  continuous-integration, github-actions
link-snitch
GitHub Action to scan your site for broken links so you can fix them 🔗
Stars: ✭ 50 (-27.54%)
Mutual labels:  continuous-integration, github-actions

Django Security Check

Helps you continuously monitor and fix common security vulnerabilities in your Django application.

If you are thinking of using this action, congratulations. You're well on your way to building a secure Django project!

Use this in your workflow

You can use this action in a workflow file to continuously run Django's check --deploy against your production Django application configuration. Here is an example workflow that runs Django Security Check on any push event to the master branch. See below for env instructions.

name: Django Security Check

on:
  push:
    branches:
      - master

env:
  SECRET_KEY: ${{ secrets.SECRET_KEY }}
  FAIL_LEVEL: WARNING
  ENV_TYPE: venv
  DEP_PATH: app/requirements.txt
  APP_PATH: app/
  EXTRA_ARGS: "--settings=app.settings.production"

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - name: Check out master
        uses: actions/checkout@master
        with:
          fetch-depth: 1
      - name: Scan Django settings for security issues
        id: check
        uses: victoriadrake/django-security-check@master
      - name: Upload output
        uses: actions/upload-artifact@v2
        with:
          name: security-check-output
          path: output.txt

View results

In the example workflow file above, you can view results in the Action workflow run, or download them as an artifact. Here is an example of output from a check.

You can also add the check output to a comment, for example, if the workflow was triggered by a pull request. To do this, set an output parameter and use actions/github-script. Here's an example workflow you can copy that runs on pull requests:

name: Django Security Check

on: pull_request_target

env:
  SECRET_KEY: ${{ secrets.SECRET_KEY }}
  FAIL_LEVEL: WARNING
  ENV_TYPE: pipenv

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - name: Check out master
        uses: actions/checkout@master
        with:
          fetch-depth: 1
      - name: Scan Django settings for security issues
        id: check
        uses: victoriadrake/django-security-check@master
      - id: results
        run: |
          OUTPUT=$(cat output.txt)
          FORMATTED=${OUTPUT//$'\n'/%0A}
          echo ::set-output name=file::**Django Security Check identified issues:** %0A$FORMATTED
      - name: Comment with output
        uses: actions/github-script@v3
        with:
          script: |
            github.issues.createComment({
              issue_number: ${{ github.event.number }},
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: `${{ steps.results.outputs.file }}`
            })

This produces:

Screenshot of security check output in comment

Helpful instructions for remediation are provided by Django in the output.

Setting the env variables

There must be a SECRET_KEY value available in order for Django to run the checks. Otherwise, an ImproperlyConfigured exception is raised. If you don't deploy from your repository, you may use a dummy value. Set a repository secret with the name of SECRET_KEY and include this as an environment variable as shown in the examples above.

The FAIL_LEVEL environment variable is the minimum severity finding that will cause the check to fail. Choices are CRITICAL, ERROR, WARNING, INFO, and DEBUG. If not set, it defaults to ERROR.

Depending on what you've set as a FAIL_LEVEL, this action may return results without a failed check. For example, the default ERROR level may still return WARNING results, although the check is a pass. To fail the check on WARNING results, set FAIL_LEVEL to WARNING, INFO, or DEBUG.

This action currently supports use of Pipenv or venv.

If you are using Pipenv, set ENV_TYPE: pipenv. Set the DEP_PATH variable to point to the directory containing your Pipfile. For example, if you have project-root/app/Pipfile, set DEP_PATH: app/. If you have project-root/Pipfile, you can leave this unset.

If you are using venv, set ENV_TYPE: venv as above. Set the DEP_PATH variable to the path of your dependencies file from the root, including the file name, as above. This is usually called requirements.txt, but may be different in your application.

Set the APP_PATH to the location of your manage.py file. For example, if you have project-root/application/manage.py, then set APP_PATH: application/. If you have project-root/manage.py, you can leave this unset.

If you are not using a virtual environment, shame on you. This action will still try to help you by installing Django. Ensure you set APP_PATH to the directory of your manage.py file.

You can use EXTRA_ARGS to pass any additional desired arguments, such as a settings module.

Workflow customization

See full instructions for Configuring and managing workflows.

For help editing the YAML file, see Workflow syntax for GitHub Actions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].