diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2483e2b10e..1491e606b1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,6 +47,9 @@ on: '**/*.wgsl' ] +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} cancel-in-progress: true diff --git a/.github/workflows/server-metal.yml b/.github/workflows/server-metal.yml index 1d707bef44a..5c26741b621 100644 --- a/.github/workflows/server-metal.yml +++ b/.github/workflows/server-metal.yml @@ -53,7 +53,7 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 - ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Build id: cmake_build diff --git a/.github/workflows/server-webui.yml b/.github/workflows/server-webui.yml index 94899c93761..ab1b63987bf 100644 --- a/.github/workflows/server-webui.yml +++ b/.github/workflows/server-webui.yml @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 - ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Setup Node.js id: node diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 99d05226ba5..127783536ad 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -67,7 +67,7 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 - ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Build id: cmake_build @@ -115,7 +115,7 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 - ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Build id: cmake_build diff --git a/scripts/serve-static.js b/scripts/serve-static.js index df4953e61ec..36e4cdb5ec5 100644 --- a/scripts/serve-static.js +++ b/scripts/serve-static.js @@ -24,6 +24,15 @@ const mimeTypes = { '.woff2': 'font/woff2', }; +function escapeHtml(value) { + return value + .replaceAll('&', '&') + .replaceAll('<', '<') + .replaceAll('>', '>') + .replaceAll('"', '"') + .replaceAll("'", '''); +} + async function generateDirListing(dirPath, reqUrl) { const files = await fs.readdir(dirPath); let html = ` @@ -40,7 +49,7 @@ async function generateDirListing(dirPath, reqUrl) {
-