Compare commits

...

138 Commits

Author SHA1 Message Date
renovate[bot] 7c19fbaea8 chore: update step-security/harden-runner action to v2.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-22 12:54:53 +00:00
renovate[bot] 2bb675062b chore: update github/codeql-action action to v3.25.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 04:41:01 +00:00
renovate[bot] 0767b3610b chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-20 12:08:56 +00:00
renovate[bot] 9bcfd79b9e chore: update dependency supertest to v7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-17 08:26:56 -04:00
renovate[bot] 7929859a61 chore: update actions/checkout action to v4.1.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-17 01:47:11 +00:00
renovate[bot] d339136c8d chore: update github/codeql-action action to v3.25.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-13 13:14:38 +00:00
renovate[bot] bc6ca060a1 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-13 05:06:15 +00:00
renovate[bot] 33dbd5fcc4 chore: update ossf/scorecard-action action to v2.3.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 01:44:12 +00:00
renovate[bot] 633482e152 chore: update dependency chai to ^5.1.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-09 16:12:35 +00:00
renovate[bot] 30a41bcb20 chore: update actions/checkout action to v4.1.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-09 01:14:28 +00:00
renovate[bot] a8305f85ba chore: update github/codeql-action action to v3.25.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-08 18:18:43 +00:00
renovate[bot] 1f7d29774e chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 04:55:58 +00:00
renovate[bot] 8c0ea62fa4 chore: update step-security/harden-runner action to v2.7.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 04:04:56 +00:00
renovate[bot] c474b4e9e4 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-29 03:01:04 +00:00
renovate[bot] 8d60f4a6e8 chore: update github/codeql-action action to v3.25.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 01:25:11 +00:00
renovate[bot] 29b4bc10d7 chore: update actions/checkout action to v4.1.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-25 11:00:43 -04:00
renovate[bot] 5102eb12b9 chore: update dependency @commitlint/cli to ^19.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 06:39:57 +00:00
renovate[bot] 38b9c32efa chore: update github/codeql-action action to v3.25.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 01:12:27 +00:00
renovate[bot] 8645450c59 chore: update actions/upload-artifact action to v4.3.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 22:49:30 +00:00
renovate[bot] 3b3fc3f369 chore: update actions/checkout action to v4.1.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 19:19:05 +00:00
renovate[bot] c927632878 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 04:12:13 +00:00
renovate[bot] 6a57fee349 chore: update actions/upload-artifact action to v4.3.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 18:29:51 +00:00
renovate[bot] 705880daee chore: update github/codeql-action action to v3.25.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-17 07:52:54 -04:00
renovate[bot] f4c8ed1e91 chore: update github/codeql-action action to v3.25.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 17:29:42 +00:00
renovate[bot] 09428e16b2 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 03:46:12 +00:00
renovate[bot] f5e6710068 chore: update commitlint monorepo to ^19.2.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-14 14:32:54 +00:00
renovate[bot] 0dcdfea860 chore: update github/codeql-action action to v3.24.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-08 06:58:02 +00:00
renovate[bot] 93d9a7837f chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-08 03:51:05 +00:00
renovate[bot] 8cbf36a67b chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 04:36:13 +00:00
renovate[bot] d06552cff6 chore: update dependency mocha to ^10.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-26 21:19:10 +00:00
renovate[bot] bfa045483c chore: update dependency express to ^4.19.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 19:58:11 +00:00
renovate[bot] 8b83de5d91 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 03:51:53 +00:00
renovate[bot] 67d9a8d2a4 chore: update github/codeql-action action to v3.24.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-22 16:13:37 +00:00
renovate[bot] bc3afea99a chore: update dependency express to ^4.19.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-21 04:40:53 +00:00
renovate[bot] 4b548b7938 chore: update dependency express to ^4.19.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-20 20:14:16 +00:00
renovate[bot] 23b55ae9c0 chore: update dependency @commitlint/cli to ^19.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-19 07:10:52 +00:00
renovate[bot] 9318735471 chore: update github/codeql-action action to v3.24.8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 18:35:17 +00:00
renovate[bot] e6d467cfb4 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 04:50:42 +00:00
renovate[bot] 394755b079 chore: update dependency @commitlint/cli to ^19.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-15 08:07:50 +00:00
renovate[bot] b1b61523ef chore: update github/codeql-action action to v3.24.7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-12 22:56:29 +00:00
renovate[bot] d9a42a356e chore: update commitlint monorepo to ^19.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-12 09:30:15 +00:00
renovate[bot] f11eb44efd chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-11 04:55:08 +00:00
renovate[bot] 318323ce91 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-04 03:04:02 +00:00
renovate[bot] 7c6fa43a68 chore: update dependency express to ^4.18.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 19:44:18 +00:00
renovate[bot] 0c17aba99b chore: update github/codeql-action action to v3.24.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 23:58:37 +08:00
renovate[bot] d518a53cd0 chore: update commitlint monorepo to ^19.0.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-28 16:08:27 +00:00
renovate[bot] c0056de2b4 chore: update dependency @commitlint/cli to ^19.0.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-28 17:54:32 +08:00
renovate[bot] fd41f4acb5 chore: update dependency @commitlint/cli to ^19.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-27 21:53:45 +00:00
renovate[bot] 5ecd258400 chore: update commitlint monorepo to v19
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-27 22:00:59 +08:00
Rifa Achrinza 4528459de5 test: convert to ES Module
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
2024-02-26 22:06:08 +08:00
renovate[bot] bb12eaf372 chore: update dependency chai to v5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-26 22:06:08 +08:00
renovate[bot] 2947b7a208 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-26 21:08:23 +08:00
renovate[bot] 1f4251aa30 chore: update dependency eslint to ^8.57.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-26 21:07:30 +08:00
Rifa Achrinza cf4e7ca20d ci: update CodeQL domain allowlist
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
2024-02-26 21:05:10 +08:00
renovate[bot] ec298ee65f chore: update actions/upload-artifact action to v4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-26 21:05:10 +08:00
renovate[bot] 878fe31741 chore: update github/codeql-action action to v3.24.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-23 19:41:39 +08:00
renovate[bot] 74c736d2fb chore: update dependency http-status to ^1.7.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-23 11:09:58 +00:00
renovate[bot] 6a438c5991 chore: update github/codeql-action action to v3.24.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 15:01:05 +00:00
renovate[bot] 01961ff8b9 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 00:24:09 +00:00
renovate[bot] ce3afb4f07 chore: update github/codeql-action action to v3.24.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 21:58:46 +00:00
renovate[bot] 4cc952248c chore: update dependency @commitlint/config-conventional to ^18.6.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 19:15:25 +00:00
renovate[bot] 3f74f15759 chore: update dependency lockfile-lint to ^4.13.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-21 16:39:37 +00:00
renovate[bot] f85813988c chore: update github/codeql-action action to v3.24.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-13 19:28:05 +00:00
renovate[bot] bc738c10b9 chore: update commitlint monorepo to ^18.6.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-13 13:37:43 +00:00
dhmlau 6fbfbff7b2 5.0.7
* chore: lock file maintenance (renovate[bot])
 * chore: update dependency lockfile-lint to ^4.13.1 (renovate[bot])
 * chore: update dependency lockfile-lint to ^4.13.0 (renovate[bot])
 * chore: update dependency mocha to ^10.3.0 (renovate[bot])
 * chore: update actions/setup-node action to v4.0.2 (renovate[bot])
 * chore: update step-security/harden-runner action to v2.7.0 (renovate[bot])
 * chore: update github/codeql-action action to v3.24.0 (renovate[bot])
 * chore: update github/codeql-action action to v3.23.2 (renovate[bot])
 * chore: update commitlint monorepo to ^18.6.0 (renovate[bot])
 * chore: update github/codeql-action action to v3.23.1 (renovate[bot])
 * chore: update dependency supertest to ^6.3.4 (renovate[bot])
 * chore: update dependency chai to ^4.4.1 (renovate[bot])
 * chore: update github/codeql-action action to v3 (renovate[bot])
 * chore: update github/codeql-action action to v2.23.0 (renovate[bot])
 * chore: update dependency chai to ^4.4.0 (renovate[bot])
 * chore: update commitlint monorepo to ^18.4.4 (renovate[bot])
 * chore: update dependency eslint to ^8.56.0 (renovate[bot])
 * chore: update actions/setup-node action to v4.0.1 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.12 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.10 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.9 (renovate[bot])
 * chore: update step-security/harden-runner action to v2.6.1 (renovate[bot])
 * chore: add badges (Rifa Achrinza)
 * ci: further harden workflows (Rifa Achrinza)
 * ci: fix Scorecard issues (Rifa Achrinza)
 * chore: update dependency eslint to ^8.55.0 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.8 (renovate[bot])
 * chore: update commitlint monorepo to ^18.4.3 (renovate[bot])
 * chore: update dependency eslint to ^8.54.0 (renovate[bot])
 * chore: update commitlint monorepo to ^18.4.2 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.7 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.6 (renovate[bot])
 * chore: update commitlint monorepo (renovate[bot])
 * fix(cve-2023-29827): replace EJS with Handlebars to resolve security warning (KalleV)
 * ci: align CI configuration (Rifa Achrinza)
 * chore: update dependency @types/express to ^4.17.21 (renovate[bot])
 * chore: update dependency eslint to ^8.53.0 (renovate[bot])
 * chore: update dependency @commitlint/config-conventional to ^18.1.0 (renovate[bot])
 * chore: update dependency @commitlint/config-conventional to v18 (renovate[bot])
 * chore: update dependency eslint to ^8.52.0 (renovate[bot])
 * chore: update dependency @commitlint/config-conventional to ^17.8.1 (renovate[bot])
 * chore: update dependency @types/express to ^4.17.20 (renovate[bot])
 * chore: update dependency http-status to ^1.7.3 (renovate[bot])
2024-02-12 10:13:46 -05:00
renovate[bot] 28b3d3c04a chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-12 03:56:26 +00:00
renovate[bot] 9fdb0f5f9a chore: update dependency lockfile-lint to ^4.13.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-11 18:10:50 +00:00
renovate[bot] 5087c61731 chore: update dependency lockfile-lint to ^4.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-11 13:10:40 +00:00
renovate[bot] 1bb673d12d chore: update dependency mocha to ^10.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-08 19:37:13 +00:00
renovate[bot] 5c377a9be4 chore: update actions/setup-node action to v4.0.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-07 10:25:14 +00:00
renovate[bot] 0f128c176a chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 03:06:13 +00:00
renovate[bot] 5676cc878a chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-03 07:21:33 +00:00
renovate[bot] b1bd209730 chore: update step-security/harden-runner action to v2.7.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-03 04:08:55 +00:00
renovate[bot] ed4b1d3a64 chore: update github/codeql-action action to v3.24.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-02 21:23:38 +00:00
renovate[bot] b82bdb5093 chore: update github/codeql-action action to v3.23.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 20:41:03 +00:00
renovate[bot] a9497a4140 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 14:30:20 -05:00
renovate[bot] 0d81f5453a chore: update commitlint monorepo to ^18.6.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 17:30:25 +00:00
renovate[bot] 62d22a7a24 chore: update github/codeql-action action to v3.23.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 18:27:49 +00:00
renovate[bot] 83032fedf9 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 20:30:46 -05:00
renovate[bot] c1569e0c2e chore: update dependency supertest to ^6.3.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 21:23:16 +00:00
renovate[bot] d40e286dfd chore: update dependency chai to ^4.4.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-12 18:58:27 +00:00
renovate[bot] f1edd2d533 chore: update github/codeql-action action to v3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-09 10:51:37 -05:00
renovate[bot] b646662ec1 chore: update github/codeql-action action to v2.23.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 11:56:54 -05:00
renovate[bot] b15547f4db chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 04:08:49 +00:00
renovate[bot] 22c5fdb3a8 chore: update dependency chai to ^4.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-05 18:15:53 +00:00
renovate[bot] 18d953b827 chore: update commitlint monorepo to ^18.4.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-04 18:09:57 +00:00
renovate[bot] e74ffaa1fa chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 04:11:30 +00:00
renovate[bot] e47bfb19ec chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-23 04:07:32 +00:00
renovate[bot] 7c837ea5fa chore: update dependency eslint to ^8.56.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-23 01:47:15 +00:00
renovate[bot] 9c3b982d00 chore: update actions/setup-node action to v4.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-22 21:38:38 +00:00
renovate[bot] 4251f52f68 chore: update github/codeql-action action to v2.22.12
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-22 19:50:01 +00:00
renovate[bot] e00dca1275 chore: update github/codeql-action action to v2.22.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-12 22:17:17 +00:00
renovate[bot] 989e2ddbfc chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-11 04:32:18 +00:00
dhmlau cf453e9ff9 5.0.5
* chore: update github/codeql-action action to v2.22.9 (renovate[bot])
 * chore: update step-security/harden-runner action to v2.6.1 (renovate[bot])
 * chore: add badges (Rifa Achrinza)
 * ci: further harden workflows (Rifa Achrinza)
 * ci: fix Scorecard issues (Rifa Achrinza)
 * chore: lock file maintenance (renovate[bot])
 * chore: update dependency eslint to ^8.55.0 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.8 (renovate[bot])
 * chore: update commitlint monorepo to ^18.4.3 (renovate[bot])
 * chore: update dependency eslint to ^8.54.0 (renovate[bot])
 * chore: update commitlint monorepo to ^18.4.2 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.7 (renovate[bot])
 * chore: update github/codeql-action action to v2.22.6 (renovate[bot])
 * chore: update commitlint monorepo (renovate[bot])
 * fix(cve-2023-29827): replace EJS with Handlebars to resolve security warning (KalleV)
 * ci: align CI configuration (Rifa Achrinza)
 * chore: update dependency @types/express to ^4.17.21 (renovate[bot])
 * chore: update dependency eslint to ^8.53.0 (renovate[bot])
 * chore: update dependency @commitlint/config-conventional to ^18.1.0 (renovate[bot])
 * chore: update dependency @commitlint/config-conventional to v18 (renovate[bot])
 * chore: update dependency eslint to ^8.52.0 (renovate[bot])
 * chore: update dependency @commitlint/config-conventional to ^17.8.1 (renovate[bot])
 * chore: update dependency @types/express to ^4.17.20 (renovate[bot])
 * chore: update dependency http-status to ^1.7.3 (renovate[bot])

Signed-off-by: dhmlau <dhmlau@ca.ibm.com>
2023-12-07 14:00:26 -05:00
renovate[bot] 6a372c56ca chore: update github/codeql-action action to v2.22.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 09:26:34 -05:00
renovate[bot] 3311b40e33 chore: update step-security/harden-runner action to v2.6.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 09:26:26 -05:00
Rifa Achrinza 7a5e967bcf chore: add badges
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
2023-12-07 09:21:50 -05:00
Rifa Achrinza 890e36040a ci: further harden workflows
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
2023-12-07 09:21:50 -05:00
Rifa Achrinza b7de086111 ci: fix Scorecard issues
see: https://github.com/loopbackio/strong-error-handler/security/code-scanning/7
see: https://github.com/loopbackio/strong-error-handler/security/code-scanning/6
see: https://github.com/loopbackio/strong-error-handler/security/code-scanning/5
see: https://github.com/loopbackio/security/issues/27
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
2023-12-07 09:21:50 -05:00
renovate[bot] f3646fb3d5 chore: update github/codeql-action action to v2.22.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 09:21:01 -05:00
renovate[bot] 28924785a9 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 04:17:07 +00:00
renovate[bot] ea3853e492 chore: update dependency eslint to ^8.55.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-02 00:20:50 +00:00
renovate[bot] 1504a8846b chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 04:33:07 +00:00
renovate[bot] 7e8f6712fa chore: update github/codeql-action action to v2.22.8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-23 18:18:55 +00:00
renovate[bot] 912bdaef0a chore: update commitlint monorepo to ^18.4.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-21 06:11:34 +00:00
renovate[bot] 6eaa6fb478 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-20 04:23:34 +00:00
renovate[bot] b8507e4893 chore: update dependency eslint to ^8.54.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-18 03:03:46 +00:00
renovate[bot] 30d1d62537 chore: update step-security/harden-runner action to v2.6.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-17 04:28:49 +00:00
renovate[bot] 383b558613 chore: update commitlint monorepo to ^18.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-17 00:29:47 +00:00
renovate[bot] 8a94d76c74 chore: update github/codeql-action action to v2.22.7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 23:21:37 +00:00
renovate[bot] c17845c365 chore: update github/codeql-action action to v2.22.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-14 23:39:45 +08:00
renovate[bot] f67f7b8986 chore: update commitlint monorepo
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-13 13:52:25 +00:00
renovate[bot] 6ce0b144e7 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-13 08:04:45 -05:00
KalleV 5b6c6cdf5c fix(cve-2023-29827): replace EJS with Handlebars to resolve security warning
Relates to: https://github.com/loopbackio/loopback-next/issues/9867

Signed-off-by: KalleV <kvirtaneva@gmail.com>
2023-11-12 17:32:11 +08:00
Rifa Achrinza 1b9571fb07 ci: align CI configuration
see: https://github.com/loopbackio/cicd/issues/91
see: https://github.com/loopbackio/cicd/issues/90
see: https://github.com/loopbackio/cicd/issues/89
see: https://github.com/loopbackio/cicd/issues/83
see: https://github.com/loopbackio/security/issues/27
see: https://github.com/loopbackio/security/issues/26
see: https://github.com/loopbackio/security/issues/23
see: https://github.com/loopbackio/security/issues/16

Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
2023-11-09 16:06:17 +08:00
renovate[bot] 9f9baf31c1 chore: update dependency @types/express to ^4.17.21
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-07 08:00:27 +00:00
renovate[bot] c42c5dca9a chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-06 03:09:10 +00:00
renovate[bot] dd87349607 chore: update dependency eslint to ^8.53.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-04 03:10:15 +00:00
renovate[bot] e63b8fe147 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-30 04:09:36 +00:00
renovate[bot] f6a8117f9f chore: update dependency @commitlint/config-conventional to ^18.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-25 08:09:39 -04:00
renovate[bot] 7ea426436b chore: update dependency @commitlint/config-conventional to v18
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 03:58:40 +00:00
renovate[bot] dd12f62bbe chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 03:51:03 +00:00
renovate[bot] 1a21490943 chore: update dependency eslint to ^8.52.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-21 02:24:57 +00:00
renovate[bot] 04348bd245 chore: update dependency @commitlint/config-conventional to ^17.8.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 16:01:35 +00:00
renovate[bot] 8157b1e65a chore: update dependency @types/express to ^4.17.20
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-18 07:25:54 +00:00
renovate[bot] 0c1640b46d chore: update dependency http-status to ^1.7.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-17 18:19:10 +00:00
dhmlau bd0defc0b3 5.0.2
* chore: lock file maintenance (renovate[bot])
 * chore: update dependency @commitlint/config-conventional to ^17.8.0 (renovate[bot])
 * chore: update dependency @types/express to ^4.17.19 (renovate[bot])
 * chore: update dependency eslint to ^8.51.0 (renovate[bot])
 * chore: update dependency chai to ^4.3.10 (renovate[bot])
 * chore: update dependency chai to ^4.3.9 (renovate[bot])
 * chore: update actions/checkout digest to 8ade135 (renovate[bot])
 * chore: update dependency @types/express to ^4.17.18 (renovate[bot])
 * chore: update dependency eslint to ^8.50.0 (renovate[bot])
2023-10-16 08:12:01 -04:00
renovate[bot] 09d48351b5 chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 03:47:34 +00:00
renovate[bot] 3f1185dab2 chore: update dependency @commitlint/config-conventional to ^17.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-14 15:22:34 +00:00
renovate[bot] 96dcc7b719 chore: update dependency @types/express to ^4.17.19
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-10 20:41:09 -04:00
renovate[bot] b183170d23 chore: update dependency eslint to ^8.51.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-07 01:28:05 +00:00
renovate[bot] 14afd86b13 chore: update dependency chai to ^4.3.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-28 13:32:45 +00:00
renovate[bot] fd841d16ec chore: update dependency chai to ^4.3.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 12:55:39 +00:00
renovate[bot] 233d3812b1 chore: update actions/checkout digest to 8ade135
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-26 09:26:28 -04:00
renovate[bot] f4a5e519da chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-25 04:20:05 +00:00
renovate[bot] 98c6eed97b chore: update dependency @types/express to ^4.17.18
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-23 22:49:37 +00:00
renovate[bot] f9b059df67 chore: update dependency eslint to ^8.50.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-23 00:07:41 +00:00
renovate[bot] 2e9371c37b chore: lock file maintenance
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-18 04:38:46 +00:00
12 changed files with 2840 additions and 616 deletions

View File

@ -1,4 +1,4 @@
name: "CodeQL"
name: CodeQL
on:
push:
@ -9,20 +9,37 @@ on:
schedule:
- cron: '0 13 * * 6'
permissions: {}
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
steps:
- uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
objects.githubusercontent.com:443
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
languages: 'javascript'
config-file: ./.github/codeql/codeql-config.yml
languages: javascript-typescript
config-file: .github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6

View File

@ -9,34 +9,49 @@ on:
schedule:
- cron: '0 2 * * 1' # At 02:00 on Monday
env:
NODE_OPTIONS: --max-old-space-size=4096
permissions: {}
jobs:
test:
name: Test
timeout-minutes: 15
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16, 18]
node-version:
- 16
- 18
- 20
- 21
include:
- os: macos-latest
node-version: 16 # LTS
node-version: 20 # LTS
- os: windows-latest
node-version: 20 # LTS
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
fetch-depth: 0
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
nodejs.org:443
registry.npmjs.org:443
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Bootstrap project
run: |
npm ci --ignore-scripts
- uses: Yuri6037/Action-FakeTTY@v1.1
run: npm ci --ignore-scripts --prefer-offline
- uses: Yuri6037/Action-FakeTTY@1abc69c7d530815855caedcd73842bae5687c1a6 # v1.1
- name: Run tests
run: faketty npm test --ignore-scripts
@ -44,31 +59,102 @@ jobs:
name: Code Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Use Node.js 16
uses: actions/setup-node@v3
- uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
node-version: 16
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
nodejs.org:443
registry.npmjs.org:443
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false
- name: Use Node.js 20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: 'npm'
- name: Bootstrap project
run: |
npm ci --ignore-scripts
npm ci \
--ignore-scripts \
--prefer-offline
- name: Verify code linting
run: npm run lint
run: npm run lint --ignore-scripts
commit-lint:
name: Commit Lint
runs-on: ubuntu-latest
if: ${{ github.event.pull_request }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0
- name: Use Node.js 16
uses: actions/setup-node@v3
persist-credentials: false
- name: Use Node.js 20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
cache: npm
- name: Bootstrap project
run: |
npm ci --ignore-scripts
npm ci \
--ignore-scripts \
--prefer-offline
- name: Verify commit linting
run: npx commitlint --from origin/master --to HEAD --verbose
run: |
npm exec \
--no-install \
--package=@commitlint/cli \
-- \
commitlint \
--from=origin/master \
--to=HEAD \
--verbose
lockfile-lint:
name: Lockfile Lint
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false
- name: Use Node.js 20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: npm
- name: Bootstrap project
run: |
npm ci \
--ignore-scripts \
--prefer-offline
- name: Verify commit linting
run: |
npm exec \
--no-install \
--package=lockfile-lint \
-- \
lockfile-lint \
--path=package-lock.json \
--allowed-hosts=npm \
--validate-https \
--validate-integrity \
--validate-package-names

78
.github/workflows/scorecards.yml vendored Normal file
View File

@ -0,0 +1,78 @@
# Based on `scorecard.yml` Github Actions starter workflow:
# https://github.com/actions/starter-workflows/blob/b1df8a546ed4d0f27d46aaf2f8ac1118bc522638/code-scanning/scorecard.yml
# This is separate from the CI workflow due to certain restrictions imposed by the GitHub Action action:
# https://github.com/ossf/scorecard-action/tree/99cc02c8ee27bab5f5f41e79066e0de91d313dec#workflow-restrictions
# For consistency, we should keep it a separate workflow across all our Github repositories, regardless if it's actually needed.
name: OSSF Scorecard
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule: {}
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '30 6 * * 5'
push:
branches: [master]
# Declare default permissions as read only.
# permissions: read-all
permissions: {}
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
steps:
- uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
api.osv.dev:443
api.securityscorecards.dev:443
fulcio.sigstore.dev:443
github.com:443
oss-fuzz-build-logs.storage.googleapis.com:443
rekor.sigstore.dev:443
tuf-repo-cdn.sigstore.dev:443
www.bestpractices.dev:443
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false
- uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
with:
results_file: results.sarif
results_format: sarif
# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: OSSF Scorecard SARIF file
path: results.sarif
retention-days: 90
# Upload the results to GitHub's code scanning dashboard.
- uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
sarif_file: results.sarif

View File

@ -1,3 +1,115 @@
2024-02-12, Version 5.0.7
=========================
* chore: lock file maintenance (renovate[bot])
* chore: update dependency lockfile-lint to ^4.13.1 (renovate[bot])
* chore: update dependency lockfile-lint to ^4.13.0 (renovate[bot])
* chore: update dependency mocha to ^10.3.0 (renovate[bot])
* chore: update actions/setup-node action to v4.0.2 (renovate[bot])
* chore: update step-security/harden-runner action to v2.7.0 (renovate[bot])
* chore: update github/codeql-action action to v3.24.0 (renovate[bot])
* chore: update github/codeql-action action to v3.23.2 (renovate[bot])
* chore: update commitlint monorepo to ^18.6.0 (renovate[bot])
* chore: update github/codeql-action action to v3.23.1 (renovate[bot])
* chore: update dependency supertest to ^6.3.4 (renovate[bot])
* chore: update dependency chai to ^4.4.1 (renovate[bot])
* chore: update github/codeql-action action to v3 (renovate[bot])
* chore: update github/codeql-action action to v2.23.0 (renovate[bot])
* chore: update dependency chai to ^4.4.0 (renovate[bot])
* chore: update commitlint monorepo to ^18.4.4 (renovate[bot])
* chore: update dependency eslint to ^8.56.0 (renovate[bot])
* chore: update actions/setup-node action to v4.0.1 (renovate[bot])
* chore: update github/codeql-action action to v2.22.12 (renovate[bot])
* chore: update github/codeql-action action to v2.22.10 (renovate[bot])
* chore: update github/codeql-action action to v2.22.9 (renovate[bot])
* chore: update step-security/harden-runner action to v2.6.1 (renovate[bot])
* chore: add badges (Rifa Achrinza)
* ci: further harden workflows (Rifa Achrinza)
* ci: fix Scorecard issues (Rifa Achrinza)
* chore: update dependency eslint to ^8.55.0 (renovate[bot])
* chore: update github/codeql-action action to v2.22.8 (renovate[bot])
* chore: update commitlint monorepo to ^18.4.3 (renovate[bot])
* chore: update dependency eslint to ^8.54.0 (renovate[bot])
* chore: update commitlint monorepo to ^18.4.2 (renovate[bot])
* chore: update github/codeql-action action to v2.22.7 (renovate[bot])
* chore: update github/codeql-action action to v2.22.6 (renovate[bot])
* chore: update commitlint monorepo (renovate[bot])
* fix(cve-2023-29827): replace EJS with Handlebars to resolve security warning (KalleV)
* ci: align CI configuration (Rifa Achrinza)
* chore: update dependency @types/express to ^4.17.21 (renovate[bot])
* chore: update dependency eslint to ^8.53.0 (renovate[bot])
* chore: update dependency @commitlint/config-conventional to ^18.1.0 (renovate[bot])
* chore: update dependency @commitlint/config-conventional to v18 (renovate[bot])
* chore: update dependency eslint to ^8.52.0 (renovate[bot])
* chore: update dependency @commitlint/config-conventional to ^17.8.1 (renovate[bot])
* chore: update dependency @types/express to ^4.17.20 (renovate[bot])
* chore: update dependency http-status to ^1.7.3 (renovate[bot])
2023-10-16, Version 5.0.2
=========================
* chore: lock file maintenance (renovate[bot])
* chore: update dependency @commitlint/config-conventional to ^17.8.0 (renovate[bot])
* chore: update dependency @types/express to ^4.17.19 (renovate[bot])
* chore: update dependency eslint to ^8.51.0 (renovate[bot])
* chore: update dependency chai to ^4.3.10 (renovate[bot])
* chore: update dependency chai to ^4.3.9 (renovate[bot])
* chore: update actions/checkout digest to 8ade135 (renovate[bot])
* chore: update dependency @types/express to ^4.17.18 (renovate[bot])
* chore: update dependency eslint to ^8.50.0 (renovate[bot])
2023-09-11, Version 5.0.1
=========================

View File

@ -1,5 +1,10 @@
# strong-error-handler
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8058/badge)](https://www.bestpractices.dev/projects/8058)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/loopbackio/strong-error-handler/badge)](https://securityscorecards.dev/viewer/?uri=github.com/loopbackio/strong-error-handler)
[![Continuous Integration](https://github.com/loopbackio/strong-error-handler/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/loopbackio/strong-error-handler/actions/workflows/continuous-integration.yml)
[![CodeQL](https://github.com/loopbackio/strong-error-handler/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/loopbackio/strong-error-handler/actions/workflows/codeql-analysis.yml)
This package is an error handler for use in both development (debug) and production environments.
In production mode, `strong-error-handler` omits details from error responses to prevent leaking sensitive information:

View File

@ -4,7 +4,7 @@
// License text available at https://opensource.org/licenses/MIT
'use strict';
const ejs = require('ejs');
const handlebars = require('handlebars');
const fs = require('fs');
const path = require('path');
@ -16,6 +16,13 @@ const compiledTemplates = {
module.exports = sendHtml;
/**
* Sends HTML response to the client.
*
* @param {Object} res - The response object.
* @param {Object} data - The data object to be rendered in the HTML.
* @param {Object} options - The options object.
*/
function sendHtml(res, data, options) {
const toRender = {options, data};
// TODO: ability to call non-default template functions from options
@ -23,6 +30,35 @@ function sendHtml(res, data, options) {
sendResponse(res, body);
}
/**
* Returns the content of a Handlebars partial file as a string.
* @param {string} name - The name of the Handlebars partial file.
* @returns {string} The content of the Handlebars partial file as a string.
*/
function partial(name) {
const partialPath = path.resolve(assetDir, `${name}.hbs`);
const partialContent = fs.readFileSync(partialPath, 'utf8');
return partialContent;
}
handlebars.registerHelper('partial', partial);
/**
* Checks if the given property is a standard property.
* @param {string} prop - The property to check.
* @param {Object} options - The Handlebars options object.
* @returns {string} - The result of the Handlebars template.
*/
function standardProps(prop, options) {
const standardProps = ['name', 'statusCode', 'message', 'stack'];
if (standardProps.indexOf(prop) === -1) {
return options.fn(this);
}
return options.inverse(this);
}
handlebars.registerHelper('standardProps', standardProps);
/**
* Compile and cache the file with the `filename` key in options
*
@ -32,15 +68,23 @@ function sendHtml(res, data, options) {
function compileTemplate(filepath) {
const options = {cache: true, filename: filepath};
const fileContent = fs.readFileSync(filepath, 'utf8');
return ejs.compile(fileContent, options);
return handlebars.compile(fileContent, options);
}
// loads and cache default error templates
/**
* Loads the default error handlebars template from the asset directory and compiles it.
* @returns {Function} The compiled handlebars template function.
*/
function loadDefaultTemplates() {
const defaultTemplate = path.resolve(assetDir, 'default-error.ejs');
const defaultTemplate = path.resolve(assetDir, 'default-error.hbs');
return compileTemplate(defaultTemplate);
}
/**
* Sends an HTML response with the given body to the provided response object.
* @param {Object} res - The response object to send the HTML response to.
* @param {string} body - The HTML body to send in the response.
*/
function sendResponse(res, body) {
res.setHeader('Content-Type', 'text/html; charset=utf-8');
res.end(body);

2946
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
"name": "strong-error-handler",
"description": "Error handler for use in development and production environments.",
"license": "MIT",
"version": "5.0.1",
"version": "5.0.7",
"engines": {
"node": ">=16"
},
@ -19,21 +19,23 @@
"dependencies": {
"accepts": "^1.3.8",
"debug": "^4.3.4",
"ejs": "^3.1.9",
"fast-safe-stringify": "^2.1.1",
"http-status": "^1.7.0",
"handlebars": "^4.7.8",
"http-status": "^1.7.4",
"js2xmlparser": "^5.0.0",
"strong-globalize": "^6.0.6"
},
"devDependencies": {
"@commitlint/config-conventional": "^17.7.0",
"@types/express": "^4.17.17",
"chai": "^4.3.8",
"eslint": "^8.49.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@types/express": "^4.17.21",
"chai": "^5.1.1",
"eslint": "^8.57.0",
"eslint-config-loopback": "^13.1.0",
"express": "^4.18.2",
"mocha": "^10.2.0",
"supertest": "^6.3.3"
"express": "^4.19.2",
"lockfile-lint": "^4.13.2",
"mocha": "^10.4.0",
"supertest": "^7.0.0"
},
"browser": {
"strong-error-handler": false

View File

@ -5,13 +5,15 @@
'use strict';
const cloneAllProperties = require('../lib/clone.js');
const debug = require('debug')('test');
const expect = require('chai').expect;
const express = require('express');
const strongErrorHandler = require('..');
const supertest = require('supertest');
const util = require('util');
import cloneAllProperties from '../lib/clone.js';
import debugFactory from 'debug';
import express from 'express';
import strongErrorHandler from '../lib/handler.js';
import supertest from 'supertest';
import util from 'node:util';
import {expect} from 'chai';
const debug = debugFactory('test');
describe('strong-error-handler', function() {
before(setupHttpServerAndClient);
@ -137,8 +139,7 @@ describe('strong-error-handler', function() {
// the error name & message
expect(msg).to.contain('TypeError: ERROR-NAME');
// the stack
expect(msg).to.contain(__filename);
expect(msg).to.contain(import.meta.url);
done();
});
});
@ -161,7 +162,7 @@ describe('strong-error-handler', function() {
expect(msg).to.contain('TypeError: ERR1');
expect(msg).to.contain('Error: ERR2');
// verify that stacks are included too
expect(msg).to.contain(__filename);
expect(msg).to.contain(import.meta.url);
done();
});
@ -607,10 +608,12 @@ describe('strong-error-handler', function() {
expect(res.statusCode).to.eql(404);
const body = res.error.text;
expect(body).to.match(
/<title>Error&lt;img onerror=alert\(1\) src=a&gt;<\/title>/,
// eslint-disable-next-line max-len
/<title>Error&lt;img onerror&#x3D;alert\(1\) src&#x3D;a&gt;<\/title>/,
);
expect(body).to.match(
/with id &lt;img onerror=alert\(1\) src=a&gt; found for Model/,
// eslint-disable-next-line max-len
/with id &lt;img onerror&#x3D;alert\(1\) src&#x3D;a&gt; found for Model/,
);
done();
});
@ -627,7 +630,8 @@ describe('strong-error-handler', function() {
.expect(500)
.expect(/<title>ErrorWithProps<\/title>/)
.expect(
/500(.*?)a test error message&lt;img onerror=alert\(1\) src=a&gt;/,
// eslint-disable-next-line max-len
/500(.*?)a test error message&lt;img onerror&#x3D;alert\(1\) src&#x3D;a&gt;/,
done,
);
});

View File

@ -1,25 +0,0 @@
<html>
<head>
<meta charset='utf-8'>
<title><%= data.name || data.message %></title>
<style><%- include('style.css') %></style>
</head>
<body>
<div id="wrapper">
<h1><%= data.name %></h1>
<h2><em><%= data.statusCode %></em> <%= data.message %></h2>
<%
// display all the non-standard properties
var standardProps = ['name', 'statusCode', 'message', 'stack'];
for (var prop in data) {
if (standardProps.indexOf(prop) == -1 && data[prop]) { %>
<div><b><%= prop %></b>: <%= data[prop] %></div>
<% }
}
if (data.stack) { %>
<pre id="stacktrace"><%- data.stack %></pre>
<% }
%>
</div>
</body>
</html>

25
views/default-error.hbs Normal file
View File

@ -0,0 +1,25 @@
<html>
<head>
<meta charset="utf-8" />
<title>{{ data.name }}{{#unless data.name}}{{ data.message }}{{/unless}}</title>
<style>
{{partial 'style'}}
</style>
</head>
<body>
<div id="wrapper">
<h1>{{ data.name }}</h1>
<h2>
<em>{{ data.statusCode }}</em> {{ data.message }}
</h2>
{{#each data}}
{{#standardProps @key}}
<div><b>{{@key}}</b>: {{this}}</div>
{{/standardProps}}
{{/each}}
{{#if data.stack}}
<pre id="stacktrace">{{{data.stack}}}</pre>
{{/if}}
</div>
</body>
</html>