diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..87b4cf53 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,160 @@ +# Weekly dependency updates. Monday 09:00 Europe/Moscow. +# Minor and patch version updates share one group. Security updates share another (applies-to). +# version-update:semver-major is ignored. That filter applies to version updates, not security updates. +# Actions are pinned to a commit SHA with a version comment. Dependabot replaces the SHA and the +# comment, and does not switch the pin to a tag. Digest-pinned Dockerfiles stay digest-pinned. +# open-pull-requests-limit caps version-update pull requests. npm is 5 and docker is 3, one slot +# per manifest directory. The other ecosystems are a single directory and use 2. +# Security updates use GitHub's own cap and are collapsed by the security group. +version: 2 +updates: + - package-ecosystem: npm + directories: + - / + - /desktop + - /ops/billing + - /ops/billing/admin + - /ops/vps/dht-peers + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: Europe/Moscow + open-pull-requests-limit: 5 + ignore: + - dependency-name: "*" + update-types: + - version-update:semver-major + groups: + version-updates: + applies-to: version-updates + patterns: + - "*" + update-types: + - minor + - patch + security-updates: + applies-to: security-updates + patterns: + - "*" + + - package-ecosystem: gradle + directory: /android + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: Europe/Moscow + open-pull-requests-limit: 2 + ignore: + - dependency-name: "*" + update-types: + - version-update:semver-major + groups: + version-updates: + applies-to: version-updates + patterns: + - "*" + update-types: + - minor + - patch + security-updates: + applies-to: security-updates + patterns: + - "*" + + - package-ecosystem: cargo + directory: /desktop/src-tauri + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: Europe/Moscow + open-pull-requests-limit: 2 + ignore: + - dependency-name: "*" + update-types: + - version-update:semver-major + groups: + version-updates: + applies-to: version-updates + patterns: + - "*" + update-types: + - minor + - patch + security-updates: + applies-to: security-updates + patterns: + - "*" + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: Europe/Moscow + open-pull-requests-limit: 2 + ignore: + - dependency-name: "*" + update-types: + - version-update:semver-major + groups: + version-updates: + applies-to: version-updates + patterns: + - "*" + update-types: + - minor + - patch + security-updates: + applies-to: security-updates + patterns: + - "*" + + - package-ecosystem: docker + directories: + - /ops/vps + - /ops/vps/dht-peers + - /ops/cache-node + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: Europe/Moscow + open-pull-requests-limit: 3 + ignore: + - dependency-name: "*" + update-types: + - version-update:semver-major + groups: + version-updates: + applies-to: version-updates + patterns: + - "*" + update-types: + - minor + - patch + security-updates: + applies-to: security-updates + patterns: + - "*" + + - package-ecosystem: gitsubmodule + directory: / + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: Europe/Moscow + open-pull-requests-limit: 2 + groups: + version-updates: + applies-to: version-updates + patterns: + - "*" + security-updates: + applies-to: security-updates + patterns: + - "*" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..d8214f41 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,119 @@ +name: CodeQL + +# Separate from CI. Not a required check. Docs-only and wiki-only changes skip push and pull_request. +# Monday 09:00 Europe/Moscow (UTC+3, no daylight saving). + +permissions: + contents: read + security-events: write + +on: + push: + branches: [main] + paths-ignore: + - docs/** + - wiki/** + pull_request: + branches: [main] + paths-ignore: + - docs/** + - wiki/** + schedule: + - cron: '0 6 * * 1' + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze ${{ matrix.language }} + runs-on: ubuntu-latest + timeout-minutes: ${{ matrix.timeout }} + strategy: + fail-fast: false + matrix: + include: + - language: javascript-typescript + build-mode: none + timeout: 45 + # Android sources are Kotlin. build-mode none does not extract Kotlin. + # Autobuild runs gradle assemble, and release tasks throw without the release keystore. + # assembleDebug is the CI debug task, one ABI, and does not run those release tasks. + - language: java-kotlin + build-mode: manual + timeout: 60 + - language: rust + build-mode: none + timeout: 45 + - language: actions + build-mode: none + timeout: 20 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Checkout 2160 Player submodule + if: matrix.language == 'java-kotlin' + run: git submodule update --init --recursive + + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + if: matrix.language == 'java-kotlin' + with: + node-version: 24 + + - name: Install root dependencies + if: matrix.language == 'java-kotlin' + run: npm ci --no-audit --no-fund + + - name: Prepare the Capacitor Android project + if: matrix.language == 'java-kotlin' + run: | + set -eu + mkdir -p dist-mobile + printf '%s\n' '