CI Pipeline

Definition

A CI (Continuous Integration) Pipeline is an automated process that integrates code changes from multiple contributors into a shared repository several times a day. It involves building, testing, and validating code to ensure that new changes do not break the existing codebase. The pipeline is designed to improve software quality and reduce the time it takes to deliver updates by providing immediate feedback to developers.

Secure Settings Example

version: '2.1'

jobs:
  build:
    docker:
      - image: circleci/python:3.8
    steps:
      - checkout
      - run:
          name: Install Dependencies
          command: |
            pip install --upgrade pip
            pip install -r requirements.txt
      - run:
          name: Run Tests
          command: pytest --junitxml=test-results/junit.xml
      - store_test_results:
          path: test-results
      - store_artifacts:
          path: test-results
      - run:
          name: Security Scan
          command: |
            pip install bandit
            bandit -r . -ll

Insecure Settings Example

version: '2.1'

jobs:
  build:
    docker:
      - image: circleci/python:3.8
    steps:
      - checkout
      - run:
          name: Install Dependencies
          command: pip install -r requirements.txt
      - run:
          name: Run Tests
          command: pytest
      # Missing security scan step