Skip to content

fix(frontend): AiScriptの機密API呼び出しを制限 #602

fix(frontend): AiScriptの機密API呼び出しを制限

fix(frontend): AiScriptの機密API呼び出しを制限 #602

Workflow file for this run

name: Test (docker build)
on:
push:
branches:
- main
- next
- beta
- io
- host
pull_request:
permissions:
contents: read
packages: read
jobs:
docker:
runs-on: ubuntu-latest
if: github.repository == 'MisskeyIO/misskey'
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
- name: Persist git metadata for Docker build
shell: bash
run: |
set -euo pipefail
printf '%s\n' "$(git rev-parse --short HEAD)" > .git-commit
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare image metadata
shell: bash
run: |
set -euo pipefail
ref_type="${{ github.ref_type }}"
ref_name="$(echo ${{ github.base_ref || github.ref_name }} | sed -e 's/\//-/g')"
branch_name="main"
case "${ref_type}" in
branch)
branch_name="${ref_name}"
;;
tag)
if [[ "${ref_name}" =~ -([a-zA-Z0-9]+)\..* ]]; then
branch_name="${BASH_REMATCH[1]}"
fi
;;
esac
echo "BRANCH_NAME=${branch_name}" >> "${GITHUB_ENV}"
- name: Build an image from Dockerfile
uses: docker/build-push-action@v7
id: build-scan
with:
context: .
push: false
provenance: false
cache-from: type=registry,ref=ghcr.io/misskeyio/misskey:buildcache-${{ env.BRANCH_NAME }}
- name: Remove docker build cache
shell: bash
run: |
set -euo pipefail
docker builder prune -f
- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ steps.build-scan.outputs.imageid }}
args: --severity-threshold=medium --sarif-file-output=snyk.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v4
continue-on-error: true
with:
category: Snyk Docker Vulnerability Scan Result
sarif_file: snyk.sarif