diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5dcb08dcecd1..897d6fa84a3e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,12 +13,12 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [main] schedule: - - cron: '41 22 * * 3' + - cron: "41 22 * * 3" jobs: analyze: @@ -28,40 +28,40 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript', 'python' ] + language: ["javascript", "python"] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/deploy-docs-test.yml b/.github/workflows/deploy-docs-test.yml index 0b19440a5fd8..e2ced41e0023 100644 --- a/.github/workflows/deploy-docs-test.yml +++ b/.github/workflows/deploy-docs-test.yml @@ -3,7 +3,7 @@ name: Test documentation deployment on: pull_request: branches: - - master + - main # Review gh actions docs if you want to further define triggers, paths, etc # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 377046034ef4..bf2f5d0217aa 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages on: push: branches: - - master + - main # Review gh actions docs if you want to further define triggers, paths, etc # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 4bbb95877b30..340e65b465c2 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -50,7 +50,7 @@ jobs: - name: Coverage per file # All modified files should meet the minimum code coverage requirement. run: | - export MODIFIED_FILES=$(git diff master...HEAD --name-only | grep -E '\.py$') + export MODIFIED_FILES=$(git diff main...HEAD --name-only | grep -E '\.py$') export FAILED_COVERAGE_PER_FILE=$(python -c "import json;files=json.load(open('coverage.json'))['files'];covs=map(lambda k, v: (k, v['summary']['percent_covered_display']),files.keys(),files.values()); f=filter(lambda cov:int(cov[1])<50,covs); print('\n'.join('{:<68}{:>3}%'.format(k,v) for k,v in f))") export FAILED_COVERAGE_FILES=(); echo "$FAILED_COVERAGE_PER_FILE" | while read -r line; do FAILED_COVERAGE_FILES+=${line%%[[:space:]]*};done diff --git a/README.md b/README.md index 8060e3db6b46..0299ed9ea39e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Dispatch helps us effectively manage security incidents by deeply integrating wi This means you can let Dispatch focus on creating resources, assembling participants, sending out notifications, tracking tasks, and assisting with post-incident reviews; allowing you to focus on actually fixing the issue! -![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-1.png) ![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-2.png) ![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-3.png) ![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-4.png) +![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-1.png) ![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-2.png) ![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-3.png) ![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-4.png) ## Project resources diff --git a/docker/Dockerfile b/docker/Dockerfile index a6aeca6d51e3..fcab6e531578 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,18 +12,18 @@ SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-c"] # Get and set up Node for front-end asset building RUN apt-get update && apt-get install -y --no-install-recommends \ - # Needed for fetching stuff - ca-certificates \ - wget \ - && rm -rf /var/lib/apt/lists/* + # Needed for fetching stuff + ca-certificates \ + wget \ + && rm -rf /var/lib/apt/lists/* RUN wget --quiet -O - https://deb.nodesource.com/setup_20.x | bash - \ - && apt-get install -y nodejs --no-install-recommends + && apt-get install -y nodejs --no-install-recommends ARG SOURCE_COMMIT ENV DISPATCH_BUILD=${SOURCE_COMMIT:-unknown} LABEL org.opencontainers.image.revision=$SOURCE_COMMIT -LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-master}/LICENSE" +LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-main}/LICENSE" ARG DISPATCH_LIGHT_BUILD ENV DISPATCH_LIGHT_BUILD=${DISPATCH_LIGHT_BUILD} @@ -49,11 +49,11 @@ ENV VITE_DISPATCH_COMMIT_MESSAGE="Unknown" COPY . /usr/src/dispatch/ RUN YARN_CACHE_FOLDER="$(mktemp -d)" \ - && export YARN_CACHE_FOLDER \ - && pushd /usr/src/dispatch \ - && python setup.py bdist_wheel \ - && rm -r "$YARN_CACHE_FOLDER" \ - && mv /usr/src/dispatch/dist /dist + && export YARN_CACHE_FOLDER \ + && pushd /usr/src/dispatch \ + && python setup.py bdist_wheel \ + && rm -r "$YARN_CACHE_FOLDER" \ + && mv /usr/src/dispatch/dist /dist # This is the image to be run FROM python:3.11.10-slim-bullseye @@ -74,51 +74,51 @@ RUN groupadd -r dispatch && useradd -r -m -g dispatch dispatch # Sane defaults for pip ENV PIP_NO_CACHE_DIR=off \ - PIP_DISABLE_PIP_VERSION_CHECK=1 \ - # Dispatch config params - DISPATCH_CONF=/etc/dispatch + PIP_DISABLE_PIP_VERSION_CHECK=1 \ + # Dispatch config params + DISPATCH_CONF=/etc/dispatch RUN apt-get update && apt-get install -y --no-install-recommends \ - # Needed for fetching stuff - ca-certificates \ - wget gnupg \ - && rm -rf /var/lib/apt/lists/* + # Needed for fetching stuff + ca-certificates \ + wget gnupg \ + && rm -rf /var/lib/apt/lists/* RUN echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ - && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - + && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - RUN wget --quiet -O - https://deb.nodesource.com/setup_20.x | bash - COPY --from=sdist /dist/*.whl /tmp/dist/ RUN buildDeps="" \ - && apt-get update \ - && apt-get install -y --no-install-recommends "$buildDeps" \ - # remove internal index when internal plugins are separated - && pip install -U /tmp/dist/*.whl \ - && apt-get purge -y --auto-remove "$buildDeps" \ - # We install run-time dependencies strictly after - # build dependencies to prevent accidental collusion. - # These are also installed last as they are needed - # during container run and can have the same deps w/ - && apt-get install -y --no-install-recommends \ - pkg-config postgresql-client-14 nodejs \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - # mjml has to be installed differently here because - # after node 14, docker will install npm files at the - # root directoy and fail, so we have to create a new - # directory and use it for the install then copy the - # files to the root directory to maintain backwards - # compatibility for email generation - && mkdir -p /mjml_install \ - # if our workdir is /, then pushd/popd doesn't work - # for the npm install. It still tries to install in /, - # which npm can't do - && cd /mjml_install \ - && npm install --no-cache-dir mjml \ - && mv node_modules / \ - && cd / \ - && rm -rf /mjml_install + && apt-get update \ + && apt-get install -y --no-install-recommends "$buildDeps" \ + # remove internal index when internal plugins are separated + && pip install -U /tmp/dist/*.whl \ + && apt-get purge -y --auto-remove "$buildDeps" \ + # We install run-time dependencies strictly after + # build dependencies to prevent accidental collusion. + # These are also installed last as they are needed + # during container run and can have the same deps w/ + && apt-get install -y --no-install-recommends \ + pkg-config postgresql-client-14 nodejs \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + # mjml has to be installed differently here because + # after node 14, docker will install npm files at the + # root directoy and fail, so we have to create a new + # directory and use it for the install then copy the + # files to the root directory to maintain backwards + # compatibility for email generation + && mkdir -p /mjml_install \ + # if our workdir is /, then pushd/popd doesn't work + # for the npm install. It still tries to install in /, + # which npm can't do + && cd /mjml_install \ + && npm install --no-cache-dir mjml \ + && mv node_modules / \ + && cd / \ + && rm -rf /mjml_install EXPOSE 8000 VOLUME /var/lib/dispatch/files @@ -128,4 +128,4 @@ CMD ["server", "start", "dispatch.main:app", "--host=0.0.0.0"] ARG SOURCE_COMMIT LABEL org.opencontainers.image.revision=$SOURCE_COMMIT -LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-master}/LICENSE" +LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-main}/LICENSE" diff --git a/docs/docs/administration/installation.mdx b/docs/docs/administration/installation.mdx index efceff9ff35e..f8e5513bb554 100644 --- a/docs/docs/administration/installation.mdx +++ b/docs/docs/administration/installation.mdx @@ -33,7 +33,7 @@ Note: Dispatch will not start without at least a few required configuration vari ::: :::info -Note: Dispatch does not contain any data by default. For evaluation purposes, we do provide an example data set located [here](https://github.com/Netflix/dispatch/blob/master/data/dispatch-sample-data.dump). For instructions on how to restore this data, see [here](cli.mdx). +Note: Dispatch does not contain any data by default. For evaluation purposes, we do provide an example data set located [here](https://github.com/Netflix/dispatch/blob/main/data/dispatch-sample-data.dump). For instructions on how to restore this data, see [here](cli.mdx). ::: To start, run the install script: diff --git a/docs/docs/administration/settings/messaging.mdx b/docs/docs/administration/settings/messaging.mdx index 90411744ec67..425122b33cf5 100644 --- a/docs/docs/administration/settings/messaging.mdx +++ b/docs/docs/administration/settings/messaging.mdx @@ -4,7 +4,7 @@ Dispatch supports sending email notifications to participants of, for example, a ## Notification templates -Templates for emails are [part](https://github.com/Netflix/dispatch/tree/master/src/dispatch/messaging/email/templates) of Dispatch +Templates for emails are [part](https://github.com/Netflix/dispatch/tree/main/src/dispatch/messaging/email/templates) of Dispatch and are [Jinja](https://jinja.palletsprojects.com/) templates that during runtime are compiled into [MJML](https://mjml.io/) format. There is a way to customize these templates. To do this, if you run Dispatch with [Docker Compose](https://github.com/Netflix/dispatch-docker/), @@ -18,9 +18,9 @@ mount a volume with a customized templates dir as part of the docker compose: - "../dispatch-templates/messaging-email-templates:/usr/local/lib/python3.11/site-packages/dispatch/messaging/email/templates" ``` -Such approach allows you to customize the common template for *all projects*. +Such approach allows you to customize the common template for _all projects_. -You can also "patch" the templates *per project*. Create a folder per project (identified by project id): +You can also "patch" the templates _per project_. Create a folder per project (identified by project id): ``` dispatch/messaging/email/templates/project_id//base.mjml @@ -33,7 +33,6 @@ otherwise the resolution process will gracefully fall back to the default templa dispatch/messaging/email/templates/base.mjml ``` - ## Markdown in the notifications :::warning diff --git a/docs/docs/support.mdx b/docs/docs/support.mdx index ff87d1da645a..09b5f860a4fb 100644 --- a/docs/docs/support.mdx +++ b/docs/docs/support.mdx @@ -23,7 +23,7 @@ Once you've submitted the issue, it will be handled by our triage team, typicall ## Support Versions -At any given time, we will provide security support for the `master` branch and the two most recent releases. +At any given time, we will provide security support for the `main` branch and the two most recent releases. ## Disclosure Process diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index d926a42e28cb..f7c4bf327da0 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -50,7 +50,7 @@ const config = { docs: { sidebarPath: require.resolve("./sidebars.js"), editUrl: ({ docPath }) => - `https://github.com/netflix/dispatch/edit/master/docs/docs/${docPath}`, + `https://github.com/netflix/dispatch/edit/main/docs/docs/${docPath}`, }, theme: { customCss: require.resolve("./src/css/custom.css"),