Skip to content

Commit c3ddaa9

Browse files
metsmamrts
authored andcommitted
Generate SBOM
WE2-1236 Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 772e8be commit c3ddaa9

42 files changed

Lines changed: 106 additions & 765 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: Estonian Information System Authority
2+
# SPDX-License-Identifier: MIT
3+
14
name: Build and bundle library
25

36
on: [push, pull_request]
@@ -7,12 +10,12 @@ jobs:
710
runs-on: ubuntu-latest
811

912
steps:
10-
- uses: actions/checkout@v5
13+
- uses: actions/checkout@v6
1114
- uses: actions/setup-node@v5
1215
with:
1316
node-version: '20.x'
1417
- name: Cache Node.js modules
15-
uses: actions/cache@v4
18+
uses: actions/cache@v5
1619
with:
1720
# npm cache files are stored in `~/.npm` on Linux/macOS
1821
path: ~/.npm
@@ -26,8 +29,15 @@ jobs:
2629
run: npm run test
2730
- name: Build
2831
run: npm run build
32+
- name: Generate SBOM
33+
run: npm sbom --sbom-format spdx --package-lock-only > web-eid.js-$(node -p "require('./package.json').version").spdx
2934
- name: Upload artifacts
30-
uses: actions/upload-artifact@v4
35+
uses: actions/upload-artifact@v7
3136
with:
3237
name: web-eid-js-${{github.run_number}}
3338
path: dist/
39+
- name: Upload SBOM artifacts
40+
uses: actions/upload-artifact@v7
41+
with:
42+
name: web-eid-js-sbom-${{github.run_number}}
43+
path: "*.spdx"

.github/workflows/codeql.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: Estonian Information System Authority
2+
# SPDX-License-Identifier: MIT
3+
14
name: "CodeQL"
25

36
on:
@@ -17,16 +20,16 @@ jobs:
1720

1821
steps:
1922
- name: Checkout
20-
uses: actions/checkout@v5
23+
uses: actions/checkout@v6
2124

2225
- name: Initialize CodeQL
23-
uses: github/codeql-action/init@v3
26+
uses: github/codeql-action/init@v4
2427
with:
2528
languages: javascript
2629
queries: +security-and-quality
2730

2831
- name: Autobuild
29-
uses: github/codeql-action/autobuild@v3
32+
uses: github/codeql-action/autobuild@v4
3033

3134
- name: Perform CodeQL Analysis
32-
uses: github/codeql-action/analyze@v3
35+
uses: github/codeql-action/analyze@v4

.github/workflows/coverity.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: Estonian Information System Authority
2+
# SPDX-License-Identifier: MIT
3+
14
name: "Coverity"
25

36
on:
@@ -14,12 +17,12 @@ jobs:
1417
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
1518
PROJECTNAME: ${{ github.repository }}
1619
steps:
17-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v6
1821
- uses: actions/setup-node@v5
1922
with:
2023
node-version: '20.x'
2124
- name: Cache Node.js modules
22-
uses: actions/cache@v4
25+
uses: actions/cache@v5
2326
with:
2427
# npm cache files are stored in `~/.npm` on Linux/macOS
2528
path: ~/.npm

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: Estonian Information System Authority
2+
// SPDX-License-Identifier: MIT
3+
14
import eslint from "@eslint/js";
25
import globals from "globals";
36
import stylistic from "@stylistic/eslint-plugin";

jest.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: Estonian Information System Authority
2+
// SPDX-License-Identifier: MIT
3+
14
/** @type {import('jest').Config} */
25
const config = {
36
preset: "ts-jest",

rollup.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: Estonian Information System Authority
2+
// SPDX-License-Identifier: MIT
3+
14
import path from "path";
25

36
import cleanup from "rollup-plugin-cleanup";

src/__tests__/web-eid-test.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
/*
2-
* Copyright (c) 2020-2025 Estonian Information System Authority
3-
*
4-
* Permission is hereby granted, free of charge, to any person obtaining a copy
5-
* of this software and associated documentation files (the "Software"), to deal
6-
* in the Software without restriction, including without limitation the rights
7-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8-
* copies of the Software, and to permit persons to whom the Software is
9-
* furnished to do so, subject to the following conditions:
10-
*
11-
* The above copyright notice and this permission notice shall be included in all
12-
* copies or substantial portions of the Software.
13-
*
14-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20-
* SOFTWARE.
21-
*/
1+
// SPDX-FileCopyrightText: Estonian Information System Authority
2+
// SPDX-License-Identifier: MIT
223

234
import * as webeid from "../web-eid";
245
import ExtensionUnavailableError from "../errors/ExtensionUnavailableError";

src/config.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
/*
2-
* Copyright (c) 2020-2025 Estonian Information System Authority
3-
*
4-
* Permission is hereby granted, free of charge, to any person obtaining a copy
5-
* of this software and associated documentation files (the "Software"), to deal
6-
* in the Software without restriction, including without limitation the rights
7-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8-
* copies of the Software, and to permit persons to whom the Software is
9-
* furnished to do so, subject to the following conditions:
10-
*
11-
* The above copyright notice and this permission notice shall be included in all
12-
* copies or substantial portions of the Software.
13-
*
14-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20-
* SOFTWARE.
21-
*/
1+
// SPDX-FileCopyrightText: Estonian Information System Authority
2+
// SPDX-License-Identifier: MIT
223

234
export default Object.freeze({
245
VERSION: "2.1.0",

src/errors/ActionPendingError.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
/*
2-
* Copyright (c) 2020-2025 Estonian Information System Authority
3-
*
4-
* Permission is hereby granted, free of charge, to any person obtaining a copy
5-
* of this software and associated documentation files (the "Software"), to deal
6-
* in the Software without restriction, including without limitation the rights
7-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8-
* copies of the Software, and to permit persons to whom the Software is
9-
* furnished to do so, subject to the following conditions:
10-
*
11-
* The above copyright notice and this permission notice shall be included in all
12-
* copies or substantial portions of the Software.
13-
*
14-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20-
* SOFTWARE.
21-
*/
1+
// SPDX-FileCopyrightText: Estonian Information System Authority
2+
// SPDX-License-Identifier: MIT
223

234
import ErrorCode from "./ErrorCode";
245
import DeveloperError from "./DeveloperError";

src/errors/ActionTimeoutError.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
/*
2-
* Copyright (c) 2020-2025 Estonian Information System Authority
3-
*
4-
* Permission is hereby granted, free of charge, to any person obtaining a copy
5-
* of this software and associated documentation files (the "Software"), to deal
6-
* in the Software without restriction, including without limitation the rights
7-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8-
* copies of the Software, and to permit persons to whom the Software is
9-
* furnished to do so, subject to the following conditions:
10-
*
11-
* The above copyright notice and this permission notice shall be included in all
12-
* copies or substantial portions of the Software.
13-
*
14-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20-
* SOFTWARE.
21-
*/
1+
// SPDX-FileCopyrightText: Estonian Information System Authority
2+
// SPDX-License-Identifier: MIT
223

234
import ErrorCode from "./ErrorCode";
245

0 commit comments

Comments
 (0)