Compare commits

...

8 Commits

Author SHA1 Message Date
hamster1963
80c4500822 chore: update dependencies in package.json 2025-03-25 16:23:45 +08:00
仓鼠
aa14f6045f
chore: update permissions for auto-fix lint and format workflow (#264) 2025-03-25 16:20:33 +08:00
仓鼠
4719c2210e
Potential fix for code scanning alert no. 4: Cache Poisoning via execution of untrusted code (#262)
* Potential fix for code scanning alert no. 4: Cache Poisoning via execution of untrusted code

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-03-25 16:15:09 +08:00
仓鼠
079ff0be32
chore: add permissions for contents read in Deploy.yml (#263)
* chore: add permissions for contents read in Deploy.yml

* chore: auto-fix linting and formatting issues
2025-03-25 16:14:04 +08:00
仓鼠
38ebfcee44
Merge pull request #261 from hamster1963/alert-autofix-7
Potential fix for code scanning alert no. 7: Use of password hash with insufficient computational effort
2025-03-25 16:07:01 +08:00
仓鼠
365ba91bff chore: add @types/bcrypt 2025-03-25 07:45:25 +00:00
hamster1963
865a5ba8ee chore: auto-fix linting and formatting issues 2025-03-25 07:31:50 +00:00
仓鼠
37adab9208
Potential fix for code scanning alert no. 7: Use of password hash with insufficient computational effort
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-03-25 15:31:27 +08:00
5 changed files with 16 additions and 9 deletions

View File

@ -1,4 +1,6 @@
name: Build and push Docker image
permissions:
contents: read
on:
push:

View File

@ -1,7 +1,10 @@
name: Auto Fix Lint and Format
permissions:
contents: read
pull-requests: write
on:
pull_request_target:
pull_request:
types: [opened, synchronize]
jobs:

View File

@ -1,12 +1,12 @@
import getEnv from "@/lib/env-entry"
import CryptoJS from "crypto-js"
import bcrypt from "bcrypt"
import NextAuth from "next-auth"
import CredentialsProvider from "next-auth/providers/credentials"
export const { handlers, signIn, signOut, auth } = NextAuth({
secret:
process.env.AUTH_SECRET ??
CryptoJS.MD5(`this_is_nezha_dash_web_secret_${getEnv("SitePassword")}`).toString(),
bcrypt.hashSync(`this_is_nezha_dash_web_secret_${getEnv("SitePassword")}`, 10),
trustHost: (process.env.AUTH_TRUST_HOST as boolean | undefined) ?? true,
providers: [
CredentialsProvider({

BIN
bun.lockb

Binary file not shown.

View File

@ -26,10 +26,12 @@
"@radix-ui/react-switch": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/bcrypt": "^5.0.2",
"@types/crypto-js": "^4.2.2",
"@types/d3-geo": "^3.1.0",
"@types/luxon": "^3.4.2",
"babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
"bcrypt": "^5.1.1",
"caniuse-lite": "^1.0.30001707",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
@ -43,9 +45,9 @@
"lucide-react": "^0.474.0",
"luxon": "^3.5.0",
"maxmind": "^4.3.24",
"next": "^15.2.3",
"next": "^15.2.4",
"next-auth": "^5.0.0-beta.25",
"next-intl": "^3.26.5",
"next-intl": "^4.0.2",
"next-runtime-env": "^3.2.2",
"next-themes": "^0.4.6",
"react": "^19.0.0",
@ -56,20 +58,20 @@
"recharts": "^2.15.1",
"sharp": "^0.33.5",
"swr": "^2.3.3",
"tailwind-merge": "^2.6.0",
"tailwind-merge": "^3.0.2",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@next/bundle-analyzer": "^15.2.3",
"@next/bundle-analyzer": "^15.2.4",
"@tailwindcss/postcss": "^4.0.15",
"@types/node": "^22.13.11",
"@types/node": "^22.13.13",
"@types/react": "^19.0.12",
"@types/react-dom": "^19.0.4",
"postcss": "^8.5.3",
"tailwindcss": "^4.0.15",
"typescript": "^5.8.2",
"vercel": "^39.4.2"
"vercel": "^41.4.1"
},
"overrides": {
"react-is": "^19.0.0-rc-69d4b800-20241021"