diff --git a/.github/workflows/check-pr-title.yml b/.github/workflows/check-pr-title.yml index 2a5dcc59b..b96d04e30 100644 --- a/.github/workflows/check-pr-title.yml +++ b/.github/workflows/check-pr-title.yml @@ -2,6 +2,8 @@ name: "Check PR Title" on: pull_request: types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled, converted_to_draft, edited] +permissions: + pull-requests: read jobs: check-pr-title: @@ -9,13 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Enforce conventional commit style - uses: realm/ci-actions/title-checker@main + uses: realm/ci-actions/title-checker@d6cc8f067474759d38e6d24e272027b4c88bc0a9 with: regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|ops){1}(\([\w\-\.]+\))?(!)?: .*' error-hint: 'Invalid PR title. Make sure it follows the conventional commit specification (i.e. "(): ") or add the no-title-validation label' ignore-labels: 'no-title-validation' - name: Enforce JIRA ticket in title - uses: realm/ci-actions/title-checker@main + uses: realm/ci-actions/title-checker@d6cc8f067474759d38e6d24e272027b4c88bc0a9 # Skip the JIRA ticket check for PRs opened by bots if: ${{ !contains(github.event.pull_request.user.login, '[bot]') }} with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a7954643e..559f6046d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,30 +1,24 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" +name: CodeQL on: push: - branches: [ "main" ] + branches: + - main pull_request: - # The branches below must be a subset of the branches above - branches: [ "main" ] + branches: + - main schedule: - cron: '32 18 * * 6' +permissions: + contents: read + security-events: write + jobs: analyze: name: Analyze - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + runs-on: ubuntu-latest + timeout-minutes: 360 permissions: actions: read contents: read @@ -33,27 +27,18 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + language: + - javascript + - actions steps: - name: Checkout repository uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 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. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality config: | paths-ignore: - '**/*.test.js' @@ -63,21 +48,6 @@ jobs: - '**/*.test.tsx' - '**/*.spec.tsx' - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, 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@v3 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: diff --git a/.github/workflows/draft-release.yaml b/.github/workflows/draft-release.yaml index 2246bc3ac..2a5ac954b 100644 --- a/.github/workflows/draft-release.yaml +++ b/.github/workflows/draft-release.yaml @@ -18,6 +18,9 @@ on: description: 'Exact version: (Only effective selecting "exact-version" as version bump)' required: false +permissions: + contents: write + jobs: prepare-release: runs-on: ubuntu-latest diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index c9e8f1462..323300232 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -4,6 +4,9 @@ on: release: types: [published] +permissions: + contents: read + jobs: publish-release: name: Publish Release diff --git a/.github/workflows/rebuild-changelog.yaml b/.github/workflows/rebuild-changelog.yaml index 6e6e11834..c818e0203 100644 --- a/.github/workflows/rebuild-changelog.yaml +++ b/.github/workflows/rebuild-changelog.yaml @@ -12,6 +12,10 @@ on: schedule: - cron: "0 3 * * *" +permissions: + contents: write + pull-requests: write + jobs: rebuild-changelog: name: Rebuild changelog @@ -63,7 +67,7 @@ jobs: - name: Create Pull Request id: cpr - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # 7.0.6 with: commit-message: Update changelog base: main diff --git a/.github/workflows/report-nightly-build-failures.yaml b/.github/workflows/report-nightly-build-failures.yaml index 71bac7844..018ecb943 100644 --- a/.github/workflows/report-nightly-build-failures.yaml +++ b/.github/workflows/report-nightly-build-failures.yaml @@ -10,6 +10,9 @@ on: types: - completed +permissions: + contents: read + jobs: on-failure: runs-on: ubuntu-latest diff --git a/.github/workflows/test-and-build.yaml b/.github/workflows/test-and-build.yaml index ceaaa04f3..c57a2d215 100644 --- a/.github/workflows/test-and-build.yaml +++ b/.github/workflows/test-and-build.yaml @@ -10,6 +10,9 @@ on: schedule: - cron: "0 0 * * *" +permissions: + contents: read + jobs: test-and-build: name: Test and Build