diff --git a/.changepacks/changepack_log_accuracy-and-deps.json b/.changepacks/changepack_log_accuracy-and-deps.json new file mode 100644 index 0000000..5446119 --- /dev/null +++ b/.changepacks/changepack_log_accuracy-and-deps.json @@ -0,0 +1 @@ +{"changes":{"crates/devup-access-checker/Cargo.toml":"Patch","crates/devup-access-checker-cli/Cargo.toml":"Patch"},"note":"판정 정확도 개선: robots 쿼리·한글 경로, , , gzip 하위 sitemap, HTML 판별, 선언 sitemap 판정. 의존성 최신화. 공개 API 를 Checker·Options·Report·Check·Presence·Category·Error·CATALOG 로 한정하고 주요 타입을 #[non_exhaustive] 로 지정","date":"2026-11-20T00:00:00.0000000Z"} \ No newline at end of file diff --git a/.changepacks/changepack_log_initial-release.json b/.changepacks/changepack_log_initial-release.json index b9bb24d..ef28ae8 100644 --- a/.changepacks/changepack_log_initial-release.json +++ b/.changepacks/changepack_log_initial-release.json @@ -1 +1 @@ -{"changes":{"crates/devup-access-checker/Cargo.toml":"Minor","crates/devup-access-checker-cli/Cargo.toml":"Minor"},"note":"첫 배포: SEO·GEO·웹 접근성 254개 항목의 존재 여부를 점검하는 라이브러리와 CLI","date":"2026-11-19T00:00:00.0000000Z"} +{"changes":{"crates/devup-access-checker/Cargo.toml":"Minor","crates/devup-access-checker-cli/Cargo.toml":"Minor"},"note":"첫 배포: SEO·GEO·웹 접근성 689개 항목의 존재 여부를 점검하는 라이브러리와 CLI","date":"2026-11-19T00:00:00.0000000Z"} diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6b06d82..09fa59e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,6 +11,9 @@ updates: open-pull-requests-limit: 5 ignore: - dependency-name: "changepacks/action" + groups: + actions: + patterns: ["*"] - package-ecosystem: "cargo" directory: "/" schedule: @@ -19,3 +22,7 @@ updates: time: "06:00" timezone: "Asia/Seoul" open-pull-requests-limit: 5 + # 호환(minor·patch) 업데이트는 한 PR 로 묶고, 호환이 깨지는 메이저 업데이트는 따로 연다 + groups: + cargo-compatible: + update-types: ["minor", "patch"] diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8b13c9d..b7e432c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,6 +11,14 @@ on: - "**/.gitignore" pull_request: workflow_dispatch: + inputs: + build_cli: + description: "CLI 5개 플랫폼 빌드만 확인 (업로드·배포 없음)" + type: boolean + default: false + # 매주 최신 의존성으로 빌드·테스트한다 (라이브러리 사용자는 lockfile 없이 최신 호환 버전을 받는다) + schedule: + - cron: "0 21 * * 0" # 월요일 06:00 KST concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -22,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: components: rustfmt - name: Check formatting @@ -33,7 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: components: clippy - name: Lint @@ -48,17 +56,47 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v7 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 # 테스트는 로컬 mock 서버(wiremock)만 사용하며 외부 네트워크에 의존하지 않는다. - name: Test run: cargo test --workspace --all-features + latest-deps: + name: test (latest deps) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions-rust-lang/setup-rust-toolchain@v2 + - name: Update lockfile to latest compatible versions + run: cargo update --verbose + - name: Test + run: cargo test --workspace --all-features + + # 라인 커버리지 100% 를 유지한다 (미달이면 실패) + coverage: + name: coverage (tarpaulin) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions-rust-lang/setup-rust-toolchain@v2 + - uses: taiki-e/install-action@v2 + with: + tool: cargo-tarpaulin + - name: Coverage + # llvm 엔진은 CLI 통합 테스트가 실행한 바이너리의 커버리지도 함께 수집한다 + run: cargo tarpaulin --workspace --engine llvm --fail-under 100 --out Xml --out Stdout + - uses: actions/upload-artifact@v7 + if: always() + with: + name: coverage + path: cobertura.xml + msrv: name: msrv (1.88) runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: "1.88" - name: Check @@ -70,7 +108,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 - name: Build docs run: cargo doc --workspace --no-deps env: @@ -81,18 +119,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 - name: Dry-run publish run: cargo publish --workspace --dry-run # main 에 changepack 로그가 들어오면 버전을 올리고 crates.io 에 배포한 뒤 GitHub Release 를 만든다. changepacks: name: changepacks + if: github.event_name != 'schedule' && !inputs.build_cli runs-on: ubuntu-latest needs: - fmt - clippy - test + - coverage - msrv - doc - package @@ -103,7 +143,10 @@ jobs: changepacks: ${{ steps.changepacks.outputs.changepacks }} release_assets_urls: ${{ steps.changepacks.outputs.release_assets_urls }} steps: + # 변경 판정에 base 브랜치와의 merge-base 가 필요하다 - uses: actions/checkout@v7 + with: + fetch-depth: 0 - uses: changepacks/action@main id: changepacks with: @@ -148,7 +191,7 @@ jobs: archive: zip steps: - uses: actions/checkout@v7 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: target: ${{ matrix.target }} @@ -187,3 +230,69 @@ jobs: with: upload_url: ${{ fromJson(needs.changepacks.outputs.release_assets_urls)['crates/devup-access-checker-cli/Cargo.toml'] }} asset_path: dist/${{ matrix.asset_name }}.${{ matrix.archive }}.sha256 + + # 수동 실행(build_cli)으로 릴리스 빌드·패키징만 미리 확인한다 + cli-build-check: + name: CLI build check (${{ matrix.target }}) + if: inputs.build_cli + runs-on: ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-gnu + runs-on: ubuntu-latest + asset_name: devup-access-checker-linux-x86_64 + archive: tar.gz + - target: aarch64-unknown-linux-gnu + # 네이티브 ARM 러너로 빌드한다 (aws-lc-sys 교차 컴파일 회피) + runs-on: ubuntu-24.04-arm + asset_name: devup-access-checker-linux-aarch64 + archive: tar.gz + - target: x86_64-apple-darwin + # Intel macOS 러너가 없어 ARM 러너에서 교차 빌드한다 + runs-on: macos-latest + asset_name: devup-access-checker-darwin-x86_64 + archive: tar.gz + - target: aarch64-apple-darwin + runs-on: macos-latest + asset_name: devup-access-checker-darwin-aarch64 + archive: tar.gz + - target: x86_64-pc-windows-msvc + runs-on: windows-latest + asset_name: devup-access-checker-windows-x86_64 + archive: zip + steps: + - uses: actions/checkout@v7 + - uses: actions-rust-lang/setup-rust-toolchain@v2 + with: + target: ${{ matrix.target }} + + - name: Build + run: cargo build -p devup-access-checker-cli --release --target ${{ matrix.target }} + + - name: Package (tar.gz) + if: matrix.archive == 'tar.gz' + shell: bash + run: | + mkdir -p dist + cp "target/${{ matrix.target }}/release/devup-access-checker" dist/ + strip dist/devup-access-checker 2>/dev/null || true + cd dist + tar -czf "${{ matrix.asset_name }}.tar.gz" devup-access-checker + shasum -a 256 "${{ matrix.asset_name }}.tar.gz" > "${{ matrix.asset_name }}.tar.gz.sha256" + + - name: Package (zip) + if: matrix.archive == 'zip' + shell: pwsh + run: | + New-Item -ItemType Directory -Force -Path dist | Out-Null + Copy-Item "target\${{ matrix.target }}\release\devup-access-checker.exe" "dist\" + Compress-Archive -Path "dist\devup-access-checker.exe" -DestinationPath "dist\${{ matrix.asset_name }}.zip" + $hash = (Get-FileHash "dist\${{ matrix.asset_name }}.zip" -Algorithm SHA256).Hash.ToLower() + "$hash ${{ matrix.asset_name }}.zip" | Out-File -FilePath "dist\${{ matrix.asset_name }}.zip.sha256" -Encoding ascii + + - uses: actions/upload-artifact@v7 + with: + name: ${{ matrix.asset_name }} + path: dist/ diff --git a/Cargo.lock b/Cargo.lock index 06643e0..de938a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -223,12 +223,6 @@ version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.12.2" @@ -267,7 +261,7 @@ checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", "cpufeatures", - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -395,9 +389,9 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.35.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e901edd733a1472f944a45116df3f846f54d37e67e68640ac8bb69689aca2aa" +checksum = "11119743ad110e8c1bdccd930d7f5c30c99e5fc76a7b63ec9807e84eef0c5f59" dependencies = [ "cssparser-macros", "dtoa-short", @@ -408,12 +402,12 @@ dependencies = [ [[package]] name = "cssparser-macros" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" dependencies = [ "quote", - "syn 2.0.119", + "syn 3.0.10", ] [[package]] @@ -486,8 +480,10 @@ name = "devup-access-checker" version = "0.0.0" dependencies = [ "encoding_rs", + "flate2", "futures", "imagesize", + "psl", "regex", "reqwest", "scraper", @@ -495,6 +491,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", + "unicode-normalization", "url", "wiremock", "x509-parser", @@ -509,6 +506,7 @@ dependencies = [ "futures", "serde_json", "tokio", + "wiremock", ] [[package]] @@ -545,9 +543,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ego-tree" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2972feb8dffe7bc8c5463b1dacda1b0dfbed3710e50f977d965429692d74cd8" +checksum = "7bd50d24b1b75aa817bb0339cb9f2e0e664bdfab1e160a69a0fda9145b77fab2" [[package]] name = "encoding_rs" @@ -569,6 +567,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + [[package]] name = "find-msvc-tools" version = "0.1.15" @@ -607,16 +611,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - [[package]] name = "futures" version = "0.3.34" @@ -705,15 +699,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "getopts" version = "0.2.24" @@ -746,7 +731,7 @@ dependencies = [ "js-sys", "libc", "r-efi", - "rand_core 0.10.1", + "rand_core", "wasm-bindgen", ] @@ -789,13 +774,13 @@ checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" [[package]] name = "html5ever" -version = "0.35.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4" +checksum = "456a1a377e608e555d22ddab27ac0114bc7a7b4199078108e34c2aeae6c9b130" dependencies = [ "log", "markup5ever", - "match_token", + "memchr", ] [[package]] @@ -1010,9 +995,9 @@ dependencies = [ [[package]] name = "imagesize" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e54e57b4c48b40f7aec75635392b12b3421fa26fe8b4332e63138ed278459c" +checksum = "65b27460c2c92b037f3f94c538ed9a3342f3fdf923606781629ccb35f82d042a" [[package]] name = "indexmap" @@ -1151,34 +1136,17 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - [[package]] name = "markup5ever" -version = "0.35.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fe69c934650f8f19652b3946075f0fc41ad8757dbb68f1ca14e7900ecc1c3" +checksum = "0ab3dc68ac4a0f5719e560136778c1ee716e296030d75dbd4484e37e39e3a842" dependencies = [ "log", "tendril", "web_atoms", ] -[[package]] -name = "match_token" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "memchr" version = "2.8.3" @@ -1342,19 +1310,20 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "phf" -version = "0.11.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" dependencies = [ "phf_macros", "phf_shared", + "serde", ] [[package]] name = "phf_codegen" -version = "0.11.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +checksum = "41b585a510fb76fdebead6897982ef2a03a21d8e6cbcca904999742a4afc6ffe" dependencies = [ "phf_generator", "phf_shared", @@ -1362,19 +1331,19 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100" dependencies = [ + "fastrand", "phf_shared", - "rand 0.8.8", ] [[package]] name = "phf_macros" -version = "0.11.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +checksum = "5fa8d0ca26d424d27630da600c6624696e7dec8bf7b3b492b383c5dc49e5e085" dependencies = [ "phf_generator", "phf_shared", @@ -1385,18 +1354,18 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" dependencies = [ "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752" [[package]] name = "pkg-config" @@ -1434,6 +1403,21 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psl" +version = "2.1.258" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dd856c90936a531c75647b54c4222b4745ceedf60d0a0f14853bb9458d69af9" +dependencies = [ + "psl-types", +] + +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + [[package]] name = "quinn" version = "0.11.12" @@ -1464,7 +1448,7 @@ dependencies = [ "bytes", "getrandom 0.4.3", "lru-slab", - "rand 0.10.4", + "rand", "rand_pcg", "ring", "rustc-hash", @@ -1506,15 +1490,6 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.10.4" @@ -1523,15 +1498,9 @@ checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" dependencies = [ "chacha20", "getrandom 0.4.3", - "rand_core 0.10.1", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - [[package]] name = "rand_core" version = "0.10.1" @@ -1544,7 +1513,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb95882a1e14462c69aea9984bb261293ccfe6022ef8de0eda18bd5afb0052df" dependencies = [ - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -1768,9 +1737,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scraper" -version = "0.24.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f3a24d916e78954af99281a455168d4a9515d65eca99a18da1b813689c4ad9" +checksum = "6844b5f49a5579f12ba4f89d9f7eec6d71889e4aa0bc7181821040ce66f08fff" dependencies = [ "cssparser", "ego-tree", @@ -1778,7 +1747,6 @@ dependencies = [ "html5ever", "precomputed-hash", "selectors", - "tendril", ] [[package]] @@ -1806,19 +1774,17 @@ dependencies = [ [[package]] name = "selectors" -version = "0.31.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5685b6ae43bfcf7d2e7dfcfb5d8e8f61b46442c902531e41a32a9a8bf0ee0fb6" +checksum = "8322aebea94a6cc288ff884e8a49bdbceef60206c400c6c46d22e62fc4fd91a6" dependencies = [ "bitflags", "cssparser", "derive_more", - "fxhash", "log", "new_debug_unreachable", - "phf", - "phf_codegen", "precomputed-hash", + "rustc-hash", "servo_arc", "smallvec", ] @@ -1874,9 +1840,9 @@ dependencies = [ [[package]] name = "servo_arc" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +checksum = "b4eceb519ec34d8290aaf6e46f435102f2bfa63f22b05a144fb16ab266d3b198" dependencies = [ "stable_deref_trait", ] @@ -1945,22 +1911,21 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "string_cache" -version = "0.8.9" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +checksum = "ffa8a5dbe8b3f0bbe29d4c3225daafaeead63afdc1b65fc4c01a1384166038e6" dependencies = [ "new_debug_unreachable", "parking_lot", "phf_shared", "precomputed-hash", - "serde", ] [[package]] name = "string_cache_codegen" -version = "0.5.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +checksum = "928dcdf75e47626b3617a976ec205d9f057584c371c1f23b782129268d0e6edc" dependencies = [ "phf_generator", "phf_shared", @@ -2035,13 +2000,11 @@ dependencies = [ [[package]] name = "tendril" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" dependencies = [ - "futf", - "mac", - "utf-8", + "new_debug_unreachable", ] [[package]] @@ -2241,6 +2204,15 @@ version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" +[[package]] +name = "unicode-normalization" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cd3fb03d5288b3ba9a1ee103ac7e9cbb59f0b03d64f8ddfcc04dd42758a85d" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-width" version = "0.2.3" @@ -2265,12 +2237,6 @@ dependencies = [ "serde", ] -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8_iter" version = "1.1.0" @@ -2394,9 +2360,9 @@ dependencies = [ [[package]] name = "web_atoms" -version = "0.1.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ffde1dc01240bdf9992e3205668b235e59421fd085e8a317ed98da0178d414" +checksum = "7572660c8890448ba236b7376f27e389c6a7e1c70195622faced601f855c0ada" dependencies = [ "phf", "phf_codegen", diff --git a/Cargo.toml b/Cargo.toml index 5a768af..acdb776 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ edition = "2024" rust-version = "1.88" license = "Apache-2.0" repository = "https://github.com/dev-five-git/devup-access-checker" -homepage = "https://github.com/dev-five-git/devup-access-checker" documentation = "https://docs.rs/devup-access-checker" [workspace.dependencies] diff --git a/README.md b/README.md index ae58702..1f95ba5 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,12 @@ devup-access-checker a.com b.com --only-missing | `-f, --format text\|json` | 출력 형식 | | `--only-missing` | 없는 항목만 출력 (text) | | `--no-links` | favicon · og:image 등 링크 접근, og:image 크기, 내부 링크 표본 검증 생략 | -| `--no-ai-ua` | AI 크롤러 User-Agent 요청 생략 | +| `--no-ai-ua` | AI·검색 크롤러(Yeti·Bingbot) User-Agent 요청 생략 | | `--no-transport` | 리다이렉트 체인 · HTTP→HTTPS · www/URL 변형 · TLS 인증서 · 압축 확인 생략 | | `--no-resources` | 외부 CSS·JS·이미지 분석(초점 표시, font-display, 페이지 무게) 생략 | | `--pages <수>` | 여러 페이지 표본 수 (기본 10, 0이면 생략) | | `--timeout <초>` | 대상 페이지 timeout (기본 30) | +| `--indexnow-key <키>` | IndexNow 키 파일(`/{키}.txt`) 확인. 키 파일 이름은 비밀이라 지정해야만 확인합니다 | URL을 여러 개 주면 동시에 점검하고, 결과는 입력 순서대로 출력합니다. 종료 코드: `0` 성공, `2` 하나 이상의 URL을 가져오지 못함. @@ -42,21 +43,25 @@ URL을 여러 개 주면 동시에 점검하고, 결과는 입력 순서대로 ## 라이브러리 ```rust -use devup_access_checker::{Checker, Presence}; +use devup_access_checker::{Checker, Options, Presence}; -let report = Checker::default().check("devfive.kr").await?; +let mut opts = Options::default(); +opts.check_ai_user_agents = false; // 필요한 옵션만 바꾼다 + +let report = Checker::new(opts).check("devfive.kr").await?; if report.get("geo.llms_txt").map(|c| c.presence) == Some(Presence::Missing) { /* ... */ } ``` `report.checks`는 항상 [`CATALOG`](crates/devup-access-checker/src/catalog.rs)와 같은 id를 같은 순서로 담습니다. 점검을 실행하지 않고 전체 항목 목록(id, 분류, 항목명)이 필요하면 `devup_access_checker::CATALOG`를 쓰면 됩니다. 항목 id는 버전이 바뀌어도 의미가 유지됩니다. -`html::extract`, `robots::Robots`, `sitemap::summarize`, `signals::*`는 네트워크 없이 단독으로도 쓸 수 있습니다. +공개 API는 `Checker`, `Options`, `Report`, `Check`, `Presence`, `Category`, `Error`, `CATALOG`, `normalize_url`입니다. 파싱·요청 모듈은 내부 구현이라 공개하지 않습니다. `Options`·`Report`·`Check`·`Category`·`Error`는 `#[non_exhaustive]`라서, 이후 버전에서 필드나 분류가 추가되어도 호환성이 깨지지 않습니다. `Options`는 `Options::default()`로 만든 뒤 필드를 바꿔 씁니다. ## 대상 페이지가 차단되거나 리다이렉트될 때 - **클라이언트 측 리다이렉트:** 지연 5초 이하의 meta refresh와, 본문이 거의 없는 페이지의 `location.href = "..."` · `location.replace("...")`는 검색엔진처럼 따라가서 최종 페이지를 분석합니다(최대 3회). 따라간 기록은 `transport.meta_refresh_redirect` · `transport.js_redirect`에 남습니다. - **차단·오류 페이지:** 대상 페이지가 2xx가 아니거나 봇 차단 페이지(Cloudflare, Akamai, F5, Imperva 등)이면 리포트의 `blocked`에 사유가 들어갑니다. 이때 페이지 HTML·헤더에서 나온 항목은 모두 `unknown`이 됩니다. 실제 페이지를 보지 못했는데 "없음"으로 판정하지 않기 위해서입니다. robots.txt·sitemap 같은 사이트 파일 항목은 그대로 판정합니다. - **부속 요청의 차단:** robots.txt·llms.txt·표본 페이지 등이 봇 차단 페이지로 돌아오면 "없음"이 아니라 `unknown`입니다. AI 크롤러 User-Agent 요청이 차단 페이지를 받으면 `geo.ua_access.*`는 `missing`이고, 값의 `challenge`에 공급자가 남습니다. +- **해석 규칙:** 상대 링크는 ``가 있으면 그것을 기준으로 해석합니다. 문자 인코딩은 BOM → `Content-Type` charset → `` 순으로 정하므로 EUC-KR 페이지도 그대로 읽습니다. robots.txt 규칙은 경로와 쿼리를 함께 보고, 한글 경로는 퍼센트 인코딩해 비교합니다. sitemap index는 첫 하위 sitemap(`.xml.gz` 포함)의 페이지를 표본으로 씁니다. - **요청 예절과 속도:** 같은 호스트에는 동시에 최대 8개 요청만 보내고, 연결 실패는 한 번 재시도합니다(timeout·DNS 실패는 재시도하지 않음). 대상 페이지 본문은 15MB까지만 받습니다. 서로 의존하지 않는 요청은 모두 동시에 보내며, `http://` 확인은 5초 안에 끝냅니다. `DEVUP_ACCESS_CHECKER_TRACE=1` 환경 변수를 주면 요청별 대기·소요 시간을 stderr로 출력합니다. ## Presence @@ -70,6 +75,14 @@ if report.get("geo.llms_txt").map(|c| c.presence) == Some(Presence::Missing) { / `present`는 "좋다"는 뜻이 아니라 "있다"는 뜻입니다. 그래서 `indexing.meta_noindex`, `transport.mixed_content`, `content.img_alt_missing`처럼 부정적인 항목은 `present`가 곧 문제가 발견되었다는 의미입니다. +## 테스트 + +`cargo test --workspace`로 실행합니다. 모든 테스트는 로컬 mock 서버만 쓰고 외부 네트워크에 의존하지 않습니다. CI는 [cargo-tarpaulin](https://github.com/xd009642/tarpaulin)으로 라인 커버리지 100%를 확인하며, 미달이면 실패합니다. + +```sh +cargo tarpaulin --workspace --engine llvm --fail-under 100 +``` + ## 지원 Rust 버전 Rust 1.88 이상 (CI에서 확인). @@ -78,17 +91,22 @@ Rust 1.88 이상 (CI에서 확인). [changepacks](https://github.com/changepacks/changepacks)로 배포합니다. 변경 사항과 함께 `.changepacks/` 에 changepack 로그를 추가해 main 에 머지하면 CI가 버전을 올리고 crates.io 에 배포한 뒤, CLI 바이너리를 GitHub Release 에 올립니다. 저장소 시크릿 `CARGO_REGISTRY_TOKEN`이 필요합니다. +## 점검 기준 대조표 + +KWCAG 2.2 의 33개 검사항목, axe-core 규칙, Lighthouse(SEO·모범 사례·성능), Google 검색 센터, OWASP 보안 헤더를 하나씩 대조했습니다. 기준마다 어떤 항목으로 확인하는지, 정적 HTML 로는 왜 확인할 수 없는지(렌더링·스크립트 실행·의미 판단 필요)는 [docs/coverage.md](docs/coverage.md)에 있습니다. + ## 점검 항목 옵션과 상황에 따라 일부 항목이 빠질 수 있습니다. -- `crawling.sitemap_entries` · `sitemap_lastmod` · `sitemap_foreign_host` · `sitemap_broken_urls` · `sitemap_noindex_pages` · `sitemap_canonical_mismatch` · `sitemap_oversize`는 sitemap(기본 경로 또는 robots.txt 선언)을 찾았을 때만 나옵니다. sitemap index이면 `sitemap_noindex_pages`와 `sitemap_canonical_mismatch`는 나오지 않습니다. +- `crawling.sitemap_entries` · `sitemap_lastmod` · `sitemap_foreign_host` · `sitemap_broken_urls` · `sitemap_noindex_pages` · `sitemap_canonical_mismatch` · `sitemap_oversize` · `sitemap_over_10mb`는 sitemap(기본 경로 또는 robots.txt 선언)을 찾았을 때만 나옵니다. sitemap index이면 `sitemap_noindex_pages`와 `sitemap_canonical_mismatch`는 나오지 않습니다. - `transport.host_variant_duplicate`는 도메인 대상(IP·localhost 제외)일 때만 나옵니다. `transport.url_variant.*`는 경로 모양에 따라 해당하는 변형만 나옵니다. -- `--no-links`를 쓰면 `links.*`, `open_graph.image_file`, `content.broken_internal_links`, `meta.favicon_size`가 빠지고 `meta.manifest_*`는 `not_applicable`이 됩니다. +- `--no-links`를 쓰면 `links.*`, `open_graph.image_file`, `content.broken_internal_links`, `meta.favicon_size`가 빠지고 `meta.manifest_*`와 `crawling.feed_*`는 `not_applicable`이 됩니다. - `performance.static_asset_cache`는 같은 호스트의 script·stylesheet가 있을 때만 나옵니다. -- `--no-ai-ua`를 쓰면 `geo.ua_access.*`가 빠집니다. +- `--no-ai-ua`를 쓰면 `geo.ua_access.*`와 `crawling.ua_access.*`가 빠집니다. - `--pages 0`을 쓰면 `site.*`가 빠집니다. 표본은 sitemap(index이면 첫 하위 sitemap)에서 먼저 고르고, 부족하면 페이지 안 내부 링크로 채웁니다. 대상 페이지와 다른 호스트의 URL은 제외합니다. -- `--no-transport`를 쓰면 `transport.http_to_https_redirect` · `redirect` · `temporary_redirect` · `host_variant_duplicate` · `tls_certificate` · `url_variant.*`와 `performance.compression`이 빠집니다. +- `--no-transport`를 쓰면 `transport.http_to_https_redirect` · `redirect` · `temporary_redirect` · `host_variant_duplicate` · `tls_certificate` · `url_variant.*`와 `performance.compression`이 빠지고, `transport.redirect_hops_excess` · `redirect_chain_robots_blocked`와 `not_found_page.redirects`는 `not_applicable`이 됩니다. +- `crawling.indexnow_key_file`은 `--indexnow-key`(`Options::indexnow_key`)를 주었을 때만 확인하고, 주지 않으면 `not_applicable`입니다. 웹 접근성(`accessibility.*`)은 정적 HTML만으로 판별할 수 있는 항목만 다룹니다. 색 대비, 키보드 초점 이동, 화면 낭독 순서처럼 렌더링이 필요한 항목은 포함하지 않습니다. @@ -117,6 +135,18 @@ Rust 1.88 이상 (CI에서 확인). | `indexing.x_robots_tag` | X-Robots-Tag 헤더 | | `indexing.header_noindex` | X-Robots-Tag noindex | | `indexing.meta_refresh` | meta refresh 리다이렉트 | +| `indexing.snippet_controls` | 스니펫 제한 지시어 (nosnippet·max-snippet 등) | +| `indexing.naver_directives` | 네이버 전용 지시어 (nosourceinfo·nosublinks·nosublink) | +| `indexing.bingbot_meta` | Bing 전용 robots 지시 (meta bingbot·X-Robots-Tag bingbot:) | +| `indexing.noindex_blocked_by_robots` | robots.txt 로 막혀 noindex 를 볼 수 없음 | +| `indexing.robots_unknown_directives` | 알 수 없는 robots 지시어 | +| `indexing.unavailable_after_passed` | unavailable_after 날짜 지남 | +| `indexing.robots_conflicting_directives` | 상충하는 robots 지시어 (index+noindex 등) | +| `indexing.data_nosnippet_invalid_element` | span·div·section 외 요소의 data-nosnippet | +| `indexing.applebot_meta` | Apple 전용 robots 지시 (meta applebot·X-Robots-Tag applebot:) | +| `indexing.yandex_meta` | Yandex 전용 robots 지시 (meta yandex·X-Robots-Tag yandex:) | +| `indexing.yandex_noindex_tag` | Yandex 태그 | +| `indexing.google_meta` | meta name=google (notranslate 등) | | `open_graph.title` | og:title | | `open_graph.description` | og:description | | `open_graph.image` | og:image | @@ -147,6 +177,7 @@ Rust 1.88 이상 (CI에서 확인). | `content.h2` | h2 태그 | | `content.img_alt_missing` | alt 누락 이미지 | | `content.body_text` | 정적 HTML body 텍스트 | +| `content.csr_shell` | CSR 셸 추정 (정적 HTML 본문이 거의 없음). present 면 본문·접근성 항목이 실제 화면과 다를 수 있음 | | `content.internal_links` | 내부 링크 | | `content.external_links` | 외부 링크 | | `accessibility.cert_mark` | 정보통신접근성 품질인증 마크 | @@ -185,7 +216,10 @@ Rust 1.88 이상 (CI에서 확인). | `crawling.robots_allows.googlebot` | Google 크롤러 허용 (Googlebot) | | `crawling.robots_allows.bingbot` | Bing 크롤러 허용 (Bingbot) | | `crawling.robots_allows.yeti` | Naver 크롤러 허용 (Yeti) | -| `crawling.robots_allows.daumoa` | Daum 크롤러 허용 (Daumoa) | +| `crawling.robots_allows.daum` | Daum 크롤러 허용 (Daum) | +| `crawling.robots_allows.applebot` | Apple 검색(Siri·Spotlight) 크롤러 허용 (Applebot) | +| `crawling.robots_allows.googlebot_image` | Google 이미지 크롤러 허용 (Googlebot-Image) | +| `crawling.robots_allows.yandex` | Yandex 크롤러 허용 (Yandex) | | `geo.llms_txt` | llms.txt | | `geo.llms_full_txt` | llms-full.txt | | `geo.ai_txt` | ai.txt | @@ -193,7 +227,7 @@ Rust 1.88 이상 (CI에서 확인). | `geo.llms_txt_summary` | llms.txt > 요약 | | `geo.llms_txt_sections` | llms.txt ## 섹션 | | `geo.llms_txt_links` | llms.txt 링크 목록 | -| `geo.tdm_reservation` | TDM 예약 (tdmrep.json / 헤더 / 메타) | +| `geo.tdm_reservation` | TDM 예약 선언 (tdmrep.json / 헤더 / 메타) | | `geo.robots_allows.gptbot` | OpenAI 학습 크롤러 허용 (GPTBot) | | `geo.robots_allows.oai_searchbot` | ChatGPT 검색 크롤러 허용 (OAI-SearchBot) | | `geo.robots_allows.chatgpt_user` | ChatGPT 사용자 요청 크롤러 허용 (ChatGPT-User) | @@ -208,12 +242,27 @@ Rust 1.88 이상 (CI에서 확인). | `geo.robots_allows.amazonbot` | Amazon 크롤러 허용 (Amazonbot) | | `geo.robots_allows.bytespider` | ByteDance 크롤러 허용 (Bytespider) | | `geo.robots_allows.ccbot` | Common Crawl 크롤러 허용 (CCBot) | +| `geo.robots_allows.google_cloudvertexbot` | Vertex AI 에이전트 크롤러 허용 (Google-CloudVertexBot) | +| `geo.robots_allows.googleother` | Google 범용(연구) 크롤러 허용 (GoogleOther) | +| `geo.robots_allows.meta_webindexer` | Meta AI 검색 인용 크롤러 허용 (meta-webindexer) | +| `geo.robots_allows.oai_adsbot` | ChatGPT 광고 검증 크롤러 허용 (OAI-AdsBot) | +| `geo.robots_allows.amzn_searchbot` | Amazon 검색 크롤러 허용 (Amzn-SearchBot) | +| `geo.robots_allows.amzn_user` | Amazon 사용자 요청 크롤러 허용 (Amzn-User) | +| `geo.robots_allows.mistralai_user` | Mistral 사용자 요청 크롤러 허용 (MistralAI-User) | +| `geo.robots_allows.mistralai_index` | Mistral 검색 색인 크롤러 허용 (MistralAI-Index) | +| `geo.robots_allows.mistralai_training` | Mistral 학습 크롤러 허용 (MistralAI-Training) | +| `geo.robots_allows.duckassistbot` | DuckDuckGo AI 답변 크롤러 허용 (DuckAssistBot) | +| `geo.robots_allows.ai2bot` | Ai2 학습 크롤러 허용 (AI2Bot) | +| `geo.robots_allows.webzio_extended` | Webz.io AI 학습 데이터 크롤러 허용 (Webzio-extended) | | `geo.ua_access.gptbot` | AI UA 응답 (gptbot) | | `geo.ua_access.claudebot` | AI UA 응답 (claudebot) | | `geo.ua_access.perplexitybot` | AI UA 응답 (perplexitybot) | +| `geo.ua_access.ccbot` | AI UA 응답 (ccbot) | | `geo.meta_noai` | meta noai / noimageai 지시 | | `not_found_page.returns_404` | 없는 경로에 404 응답 | | `not_found_page.custom` | 커스텀 404 페이지 | +| `not_found_page.third_party_calls` | 404 페이지의 외부 호출 | +| `not_found_page.redirects` | 없는 경로가 리다이렉트됨 | | `links.favicon` | favicon 접근 | | `links.apple_touch_icon` | apple-touch-icon 접근 | | `links.canonical` | canonical 접근 | @@ -229,8 +278,23 @@ Rust 1.88 이상 (CI에서 확인). | `open_graph.image_height` | og:image:height | | `open_graph.image_alt` | og:image:alt | | `open_graph.image_file` | og:image 실제 파일 | +| `open_graph.image_type` | og:image:type | +| `open_graph.image_secure_url` | og:image:secure_url | +| `open_graph.locale_alternate` | og:locale:alternate | +| `open_graph.video` | og:video | +| `open_graph.audio` | og:audio | +| `open_graph.determiner` | og:determiner | +| `open_graph.type_unknown` | 명세에 없는 og:type 값 | +| `open_graph.type_properties` | og:type 별 속성 (article:published_time 등) | +| `open_graph.image_socialonly` | og:image socialonly (Bing 뉴스) | +| `open_graph.image_under_1200` | og:image 가로 1200px 미만 (Discover) | | `twitter.site` | twitter:site | | `twitter.creator` | twitter:creator | +| `twitter.image_alt` | twitter:image:alt | +| `twitter.player` | twitter:player | +| `twitter.app` | twitter:app:* (앱 카드) | +| `twitter.card_unknown` | 명세에 없는 twitter:card 값 | +| `twitter.domain` | twitter:domain | | `structured_data.hreflang_x_default` | hreflang x-default | | `structured_data.hreflang_self` | hreflang 자기 참조 | | `structured_data.required.organization` | Organization 스키마 필수 속성 | @@ -240,9 +304,58 @@ Rust 1.88 이상 (CI에서 확인). | `structured_data.required.breadcrumb_list` | BreadcrumbList 스키마 필수 속성 | | `structured_data.required.faq_page` | FAQPage 스키마 필수 속성 | | `structured_data.required.local_business` | LocalBusiness 스키마 필수 속성 | +| `structured_data.required.book` | Book 스키마 필수 속성 | +| `structured_data.required.course` | Course 스키마 필수 속성 | +| `structured_data.required.dataset` | Dataset 스키마 필수 속성 | +| `structured_data.required.discussion_forum` | DiscussionForumPosting 스키마 필수 속성 | +| `structured_data.required.education_qa` | Quiz 스키마 필수 속성 | +| `structured_data.required.employer_rating` | EmployerAggregateRating 스키마 필수 속성 | +| `structured_data.required.event` | Event 스키마 필수 속성 | +| `structured_data.required.claim_review` | ClaimReview 스키마 필수 속성 | +| `structured_data.required.image_license` | ImageObject 스키마 필수 속성 | +| `structured_data.required.job_posting` | JobPosting 스키마 필수 속성 | +| `structured_data.required.loyalty_program` | MemberProgram 스키마 필수 속성 | +| `structured_data.required.math_solver` | MathSolver 스키마 필수 속성 | +| `structured_data.required.movie` | Movie 스키마 필수 속성 | +| `structured_data.required.product_group` | ProductGroup 스키마 필수 속성 | +| `structured_data.required.profile_page` | ProfilePage 스키마 필수 속성 | +| `structured_data.required.qa_page` | QAPage 스키마 필수 속성 | +| `structured_data.required.recipe` | Recipe 스키마 필수 속성 | +| `structured_data.required.software_app` | SoftwareApplication 스키마 필수 속성 | +| `structured_data.required.vacation_rental` | VacationRental 스키마 필수 속성 | +| `structured_data.required.video` | VideoObject 스키마 필수 속성 | +| `structured_data.required.item_list` | ItemList 스키마 필수 속성 | +| `structured_data.required.merchant_return_policy` | MerchantReturnPolicy 스키마 필수 속성 | +| `structured_data.required.person` | Person 스키마 필수 속성 | | `content.heading_skip` | 헤딩 레벨 건너뜀 | | `content.internal_nofollow` | 내부 링크 nofollow | | `content.broken_internal_links` | 내부 링크 표본 중 비정상 응답 | +| `content.uncrawlable_links` | 검색엔진이 따라갈 수 없는 링크 (href 없음·javascript:) | +| `content.plugins` | 플러그인 콘텐츠 (Flash·Java 등) | +| `content.fragment_route_links` | 해시(#!·#/) 라우트 링크 | +| `content.pseudo_js_links` | 의사 자바스크립트 링크 (href="fn()"·href="#"+onclick) | +| `content.img_generic_filenames` | 의미 없는 이미지 파일명 (IMG_1234·숫자·해시) | +| `content.parameter_heavy_links` | 파라미터가 많은 내부 링크 (3개 이상) | +| `content.button_type_missing` | 폼 안의 type 없는 button (submit 으로 동작) | +| `content.img_missing_src` | src 없는 이미지 (data-src 만·picture 에 img 없음) | +| `content.img_unsupported_format` | Google 이미지 미지원 형식 | +| `content.hidden_text_styles` | 인라인 CSS 로 숨긴 텍스트·링크 | +| `content.unencoded_link_urls` | 퍼센트 인코딩 안 된 링크 URL (공백·비ASCII) | +| `content.outbound_link_qualifiers` | 외부 링크 rel (sponsored·ugc·nofollow) | +| `content.underscore_url_paths` | 밑줄로 단어를 구분한 URL | +| `content.linked_documents` | 비HTML 문서 링크 (PDF·HWP·Office) | +| `content.bidi_control_chars` | 본문의 양방향 제어 문자 | +| `content.invalid_urls` | 형식이 잘못된 URL (공백·역슬래시·잘못된 % 인코딩) | +| `content.invalid_enum_attrs` | 명세에 없는 열거형 속성 값 | +| `content.time_datetime_invalid` | 형식이 잘못된 time datetime | +| `content.unknown_elements` | HTML 에 없는 요소 (사용자 정의 요소 제외) | +| `content.text_not_nfc` | NFC 로 정규화되지 않은 텍스트 | +| `content.section_without_heading` | 제목 없는 section·article | +| `content.input_type_generic` | 이메일·전화 등에 type=text | +| `content.form_method_missing` | method 없는 form | +| `content.ad_blocker_class_names` | 광고 차단기에 가려지는 id·class | +| `content.attr_unsafe_chars` | 보이지 않는 제어 문자가 든 속성 값 | +| `content.broken_resources` | 깨진 하위 리소스 (JS·CSS) | | `performance.render_blocking_scripts` | head 렌더링 차단 스크립트 (async/defer 없음) | | `performance.head_stylesheets` | head 외부 스타일시트 | | `performance.preconnect` | preconnect / dns-prefetch | @@ -278,7 +391,7 @@ Rust 1.88 이상 (CI에서 확인). | `accessibility.table_headers_missing` | 제목 셀(th) 없는 표 | | `accessibility.autoplay_media` | 자동 재생 미디어 | | `accessibility.positive_tabindex` | 양수 tabindex | -| `accessibility.obsolete_elements` | 폐기된 표현 요소 (marquee·blink·font·center) | +| `accessibility.obsolete_elements` | 폐기된 HTML 요소 (marquee·font·center 등, WHATWG 폐기 목록) | | `accessibility.new_window_links` | 새 창 링크 (target=_blank) | | `accessibility.zoom_disabled` | 확대 금지 viewport | | `accessibility.vague_link_text` | 목적을 알 수 없는 링크 텍스트 | @@ -290,6 +403,111 @@ Rust 1.88 이상 (CI에서 확인). | `accessibility.autocomplete_missing` | 개인정보 입력란 autocomplete 누락 | | `accessibility.html_lang_valid` | html lang 형식 (BCP 47) | | `accessibility.outline_removed` | 초점 표시 제거 (outline: none) | +| `accessibility.invalid_aria_role` | ARIA 명세에 없는 role | +| `accessibility.invalid_aria_attr` | ARIA 명세에 없는 aria-* 속성 | +| `accessibility.role_img_unnamed` | 이름 없는 role="img" | +| `accessibility.video_captions_missing` | 자막 트랙 없는 video | +| `accessibility.area_alt_missing` | alt 없는 이미지맵 area | +| `accessibility.object_alt_missing` | 대체 텍스트 없는 object/embed | +| `accessibility.element_lang_invalid` | 본문 요소의 잘못된 lang 값 | +| `accessibility.nested_interactive` | 링크·버튼 안의 인터랙티브 요소 | +| `accessibility.list_structure_invalid` | 잘못된 목록 구조 (ul/ol 밖 li 등) | +| `accessibility.aria_hidden_root` | html/body 에 aria-hidden="true" | +| `accessibility.timed_refresh` | 시간 제한 자동 새로고침 (meta refresh 지연) | +| `accessibility.duplicate_accesskeys` | 중복 accesskey | +| `accessibility.presentation_focusable` | 초점을 받는 요소의 role=presentation/none | +| `accessibility.custom_control_unfocusable` | 초점을 받을 수 없는 커스텀 컨트롤 (role=button 등에 tabindex 없음) | +| `accessibility.custom_control_unnamed` | 이름 없는 커스텀 컨트롤 | +| `accessibility.click_without_keyboard` | 키보드로 쓸 수 없는 onclick 요소 (div·span 등) | +| `accessibility.aria_required_attr_missing` | 역할에 필요한 ARIA 속성 누락 | +| `accessibility.dialog_unnamed` | 이름 없는 대화상자 (dialog) | +| `accessibility.fieldset_legend_missing` | legend 없는 fieldset | +| `accessibility.radio_group_ungrouped` | fieldset·radiogroup 으로 묶이지 않은 라디오 그룹 | +| `accessibility.autocomplete_invalid` | 잘못된 autocomplete 값 | +| `accessibility.empty_table_headers` | 비어 있는 표 제목 셀 (th) | +| `accessibility.scope_invalid` | 잘못된 scope 속성 | +| `accessibility.multiple_main` | main 랜드마크 중복 | +| `accessibility.unnamed_repeated_landmarks` | 이름 없이 반복되는 nav·aside 랜드마크 | +| `accessibility.redundant_alt` | 중복 표현이 든 alt ("이미지", "image of" 등) | +| `accessibility.empty_summary` | 비어 있는 details summary | +| `accessibility.page_title_generic` | 기본값 그대로인 페이지 제목 ("React App" 등) | +| `accessibility.markup_errors` | HTML 마크업 오류 (파서 오류) | +| `accessibility.aria_invalid_value` | 허용되지 않는 ARIA 속성 값 | +| `accessibility.aria_name_prohibited` | 이름을 붙일 수 없는 요소의 aria-label | +| `accessibility.aria_required_children` | 필수 자식 역할이 없는 ARIA 컨테이너 | +| `accessibility.aria_required_parent` | 필수 부모 역할이 없는 ARIA 요소 | +| `accessibility.aria_deprecated_role` | 폐기된 ARIA 역할 | +| `accessibility.status_widget_unnamed` | 이름 없는 progress·meter·tooltip | +| `accessibility.label_title_only` | title 속성만으로 이름이 붙은 입력 요소 | +| `accessibility.multiple_labels` | label 이 둘 이상 연결된 입력 요소 | +| `accessibility.label_name_mismatch` | 보이는 텍스트를 포함하지 않는 aria-label | +| `accessibility.landmark_not_top_level` | 다른 랜드마크 안에 든 main·banner·contentinfo | +| `accessibility.duplicate_banner` | banner(최상위 header) 중복 | +| `accessibility.duplicate_contentinfo` | contentinfo(최상위 footer) 중복 | +| `accessibility.content_outside_landmarks` | 랜드마크 밖의 본문 텍스트 | +| `accessibility.iframe_title_duplicate` | 같은 title 을 쓰는 iframe | +| `accessibility.html_xml_lang_mismatch` | html 의 lang 과 xml:lang 불일치 | +| `accessibility.server_side_image_map` | 서버 측 이미지맵 (img ismap) | +| `accessibility.definition_list_invalid` | 잘못된 정의 목록 구조 (dl·dt·dd) | +| `accessibility.table_caption_missing` | 제목(caption) 없는 데이터 표 | +| `accessibility.inline_spacing_important` | 글자·줄 간격을 !important 로 고정한 인라인 스타일 | +| `accessibility.paste_blocked` | 붙여넣기를 막은 입력 요소 | +| `accessibility.identical_link_text` | 같은 텍스트인데 목적지가 다른 링크 | +| `accessibility.orientation_lock` | 화면 방향 고정 (orientation 미디어 쿼리 + 회전) | +| `accessibility.viewport_fixed_width` | 고정 너비 viewport (리플로 불가) | +| `accessibility.site_search` | 사이트 검색 (search 요소·role=search·type=search) | +| `accessibility.breadcrumb_nav` | 이동 경로(브레드크럼) 표시 | +| `accessibility.abbr_without_title` | title 없는 abbr (약어 설명 없음) | +| `accessibility.onchange_navigation` | 값만 바꿔도 이동·제출하는 onchange | +| `accessibility.password_autocomplete_off` | 자동 완성을 끈 비밀번호 칸 | +| `accessibility.reduced_motion` | 움직임 줄이기 설정 대응 (prefers-reduced-motion) | +| `accessibility.justified_text` | 양쪽 정렬 텍스트 (text-align: justify) | +| `accessibility.obsolete_attributes` | 폐기된 HTML 속성 (align·bgcolor·border 등) | +| `accessibility.onfocus_navigation` | 초점만 받아도 이동·제출하는 onfocus | +| `accessibility.video_audio_description_missing` | 음성 해설 트랙 없는 영상 | +| `accessibility.statement_link` | 접근성 성명(정책) 링크 | +| `accessibility.media_controls_missing` | 기본 컨트롤 없는 video·audio | +| `accessibility.aria_role_redundant` | 암묵 역할과 같은 명시 role | +| `accessibility.aria_role_not_allowed` | 요소에 허용되지 않는 role | +| `accessibility.aria_attr_on_prohibited_element` | aria-* 를 쓸 수 없는 요소의 aria 속성 | +| `accessibility.aria_attr_not_allowed_for_role` | 역할에 허용되지 않는 aria-* 속성 | +| `accessibility.aria_html_attr_conflict` | HTML 속성과 충돌하는 aria-* | +| `accessibility.aria_html_attr_redundant` | HTML 속성과 중복된 aria-* | +| `accessibility.aria_deprecated_attr` | 폐기된 ARIA 속성 (aria-grabbed·aria-dropeffect) | +| `accessibility.presentational_children_roles` | 자식이 무시되는 역할 안의 의미 요소 | +| `accessibility.presentation_semantic_children` | role=presentation 인데 의미 구조를 가진 표·목록 | +| `accessibility.duplicate_landmark_names` | 같은 역할·같은 이름의 랜드마크 | +| `accessibility.landmark_role_unnamed` | 이름 없는 region·application | +| `accessibility.activedescendant_unfocusable` | 초점을 받을 수 없는 aria-activedescendant 소유자 | +| `accessibility.combobox_pattern_invalid` | 잘못된 combobox 패턴 | +| `accessibility.tabbable_non_interactive` | 역할 없이 tabindex 로 초점을 받는 요소 | +| `accessibility.iframe_tabindex_negative` | tabindex=-1 로 탭 순서에서 빠진 iframe | +| `accessibility.empty_labels` | 내용 없는 label | +| `accessibility.label_for_not_control` | 입력 요소가 아닌 대상을 가리키는 label[for] | +| `accessibility.placeholder_only_label` | placeholder 외에 보이는 레이블이 없는 입력 | +| `accessibility.form_submit_missing` | 제출 버튼 없는 form | +| `accessibility.decorative_img_conflict` | 장식 표시가 충돌하는 이미지 | +| `accessibility.alt_redundant_with_text` | 링크 텍스트와 중복된 이미지 alt | +| `accessibility.adjacent_duplicate_links` | 같은 URL 로 가는 연속 링크 | +| `accessibility.figure_unlabeled` | 캡션·이름 없는 figure | +| `accessibility.canvas_fallback_missing` | 대체 콘텐츠 없는 canvas | +| `accessibility.redundant_title_attr` | 텍스트와 같은 title 속성 | +| `accessibility.broken_fragment_links` | 대상이 없는 같은 페이지 링크 (건너뛰기 링크 포함) | +| `accessibility.mouse_only_handlers` | 키보드 대응 없는 마우스 이벤트 | +| `accessibility.css_blink` | CSS text-decoration: blink | +| `accessibility.xml_lang_without_lang` | lang 없는 xml:lang·불일치 | +| `accessibility.dir_invalid` | 잘못된 dir 값 | +| `accessibility.rtl_dir_missing` | RTL 언어인데 dir=rtl 없음 | +| `accessibility.css_direction` | CSS 로 지정한 글 방향 (direction·unicode-bidi) | +| `accessibility.bdo_without_dir` | dir 없는(또는 auto) bdo | +| `accessibility.translate_invalid` | 잘못된 translate 값 | +| `accessibility.ruby_without_rt` | rt 없는 ruby | +| `accessibility.invalid_nesting` | 허용되지 않는 요소 중첩 | +| `accessibility.phrasing_content_violation` | 구문 전용 요소 안의 블록 요소 | +| `accessibility.form_conformance_errors` | 폼 요소 적합성 오류 | +| `accessibility.summary_display_changed` | summary 의 display 변경 | +| `accessibility.statement_feedback` | 접근성 성명 피드백 수단 (메일·전화·양식) | +| `accessibility.definition_list_duplicate_terms` | 같은 dl 안에서 반복된 dt | | `trust.privacy_policy` | 개인정보처리방침 링크 | | `trust.terms` | 이용약관 링크 | | `trust.phone` | 전화번호 링크 (tel:) | @@ -298,6 +516,7 @@ Rust 1.88 이상 (CI에서 확인). | `trust.social_links` | SNS 링크 | | `trust.business_number` | 사업자등록번호 표기 | | `trust.copyright_year` | 저작권 연도 표기 | +| `trust.gpc` | Global Privacy Control (gpc.json) | | `meta.bing_site_verification` | Bing 웹마스터 인증 | | `meta.amphtml` | AMP 링크 (rel=amphtml) | | `meta.app_link_meta` | 앱 연결 메타 (apple-itunes-app·al:*) | @@ -312,6 +531,48 @@ Rust 1.88 이상 (CI에서 확인). | `security.server_header` | Server 헤더 노출 | | `security.x_powered_by` | X-Powered-By 헤더 노출 | | `security.insecure_cookies` | Secure·HttpOnly·SameSite 누락 쿠키 | +| `security.cross_origin_opener_policy` | Cross-Origin-Opener-Policy | +| `security.cross_origin_embedder_policy` | Cross-Origin-Embedder-Policy | +| `security.cross_origin_resource_policy` | Cross-Origin-Resource-Policy | +| `security.sri_missing` | SRI(integrity) 없는 외부 스크립트·스타일시트 | +| `security.insecure_form_action` | https 페이지에서 http 로 보내는 폼 | +| `security.target_blank_noopener` | rel=noopener 없는 새 창 링크 | +| `security.trusted_types` | Trusted Types (CSP require-trusted-types-for) | +| `security.x_dns_prefetch_control` | X-DNS-Prefetch-Control | +| `security.x_permitted_cross_domain_policies` | X-Permitted-Cross-Domain-Policies | +| `security.info_disclosure_headers` | 버전·내부 정보를 노출하는 헤더 (OWASP 제거 권장) | +| `security.deprecated_headers` | 폐기된 응답 헤더 (X-XSS-Protection·Expect-CT 등) | +| `security.csp_meta` | meta 태그 CSP | +| `security.csp_unsafe_inline` | CSP script-src 'unsafe-inline' 허용 | +| `security.csp_unsafe_eval` | CSP 'unsafe-eval' 허용 | +| `security.csp_broad_script_source` | CSP script-src 과다 허용 (*·https: 등) | +| `security.csp_object_src_unrestricted` | CSP object-src 미제한 | +| `security.csp_unsafe_inline_style` | CSP style-src 'unsafe-inline' 허용 | +| `security.csp_base_uri_unrestricted` | CSP base-uri 미제한 | +| `security.csp_form_action_unrestricted` | CSP form-action 미제한 | +| `security.csp_default_src_missing` | CSP default-src 없음 | +| `security.csp_strict_dynamic_without_nonce` | CSP strict-dynamic 에 nonce·hash 없음 | +| `security.csp_duplicate_directives` | CSP 지시어 중복 | +| `security.csp_insecure_scheme` | CSP 에 http: 출처 | +| `security.csp_report_only_only` | CSP 보고 전용만 설정 | +| `security.clickjacking_unprotected` | 클릭재킹 방어 없음 (X-Frame-Options·frame-ancestors) | +| `security.x_frame_options_invalid` | X-Frame-Options 값 오류 | +| `security.x_content_type_options_invalid` | X-Content-Type-Options 값 오류 | +| `security.referrer_policy_unsafe` | 안전하지 않은 Referrer-Policy | +| `security.cross_origin_policy_invalid` | COOP·COEP·CORP 값 오류 | +| `security.cors_wildcard` | CORS 전체 허용 (Access-Control-Allow-Origin: *) | +| `security.hpkp` | 폐기된 HPKP 헤더 | +| `security.p3p` | 폐기된 P3P 정책 | +| `security.cookie_samesite_invalid` | 쿠키 SameSite 값 오류 | +| `security.session_cookie_flags` | 세션·CSRF 쿠키 보호 속성 누락 | +| `security.cookie_prefix_invalid` | __Host-·__Secure- 쿠키 접두사 오류 | +| `security.cookie_syntax_invalid` | Set-Cookie 문법 오류 | +| `security.sri_invalid` | integrity 속성 오류 | +| `security.protocol_relative_urls` | 프로토콜 상대 URL (//) | +| `security.change_password_url` | 비밀번호 변경 URL (/.well-known/change-password) | +| `security.inline_event_handlers` | 인라인 이벤트 핸들러 (onclick 등) | +| `security.cors_reflects_origin_credentials` | CORS Origin 반사 + 자격증명 허용 | +| `security.vulnerable_js_libraries` | 알려진 취약 버전 JS 라이브러리 | | `performance.static_asset_cache` | 정적 리소스 Cache-Control | | `performance.dom_size` | DOM 크기 | | `performance.third_party_scripts` | 서드파티 스크립트 호스트 | @@ -320,17 +581,190 @@ Rust 1.88 이상 (CI에서 확인). | `crawling.robots_crawl_delay` | robots.txt Crawl-delay | | `crawling.robots_invalid_lines` | robots.txt 해석 불가 줄 | | `crawling.sitemap_oversize` | sitemap 한도 초과 (50MB 또는 5만 URL) | +| `crawling.script_cache_busting` | JS URL 의 타임스탬프·해시 쿼리 | +| `crawling.robots_blocks_resources_yeti` | robots.txt 가 CSS/JS 차단 (Yeti) | +| `crawling.robots_blocks_resources_bingbot` | robots.txt 가 CSS/JS 차단 (Bingbot) | +| `crawling.robots_blocks_favicon` | robots.txt 가 favicon 차단 | +| `crawling.sitemap_over_10mb` | sitemap 10MB 이상 (네이버 제출 한도) | +| `crawling.ua_access.yeti` | 검색 크롤러 UA 응답 (yeti) | +| `crawling.ua_access.bingbot` | 검색 크롤러 UA 응답 (bingbot) | +| `crawling.ua_access.applebot` | 검색 크롤러 UA 응답 (applebot) | +| `crawling.ua_access.daum` | 검색 크롤러 UA 응답 (daum) | +| `crawling.ua_access.googlebot_smartphone` | 검색 크롤러 UA 응답 (googlebot_smartphone) | +| `crawling.feed_valid` | 피드 형식 유효 (RSS·Atom) | +| `crawling.feed_items` | 피드 item 수 | +| `crawling.feed_foreign_host` | 피드 안 다른 호스트·상대 경로 URL | +| `crawling.feed_oversize` | 피드 10MB 이상 | +| `crawling.feed_full_content` | 피드 본문 전체 포함 | +| `crawling.robots_encoding` | robots.txt UTF-8 인코딩 | +| `crawling.sitemap_redirected_urls` | sitemap 표본 중 리다이렉트되는 URL | +| `crawling.indexnow_key_file` | IndexNow 키 파일 | +| `crawling.robots_content_type` | robots.txt text/plain | +| `crawling.robots_orphan_rules` | 그룹 밖 Allow/Disallow | +| `crawling.robots_unreachable` | robots.txt 5xx·네트워크 오류 (전체 차단으로 간주) | +| `crawling.robots_redirect_hops` | robots.txt 리다이렉트 5회 초과 | +| `crawling.sitemap_namespace` | sitemap 네임스페이스 | +| `crawling.sitemap_invalid_priority` | sitemap priority 범위 밖 | +| `crawling.sitemap_invalid_changefreq` | sitemap changefreq 허용값 밖 | +| `crawling.sitemap_invalid_lastmod` | sitemap lastmod W3C Datetime 형식 오류 | +| `crawling.sitemap_unescaped_entities` | sitemap 엔티티 미이스케이프 (&) | +| `crawling.sitemap_invalid_loc` | sitemap loc 형식 오류 | +| `crawling.sitemap_out_of_scope` | sitemap 위치 밖 URL | +| `crawling.sitemap_encoding` | sitemap UTF-8 | +| `crawling.robots_rule_errors` | robots.txt 규칙 형식 오류 | +| `crawling.robots_unsupported_directives` | robots.txt 미지원 지시자 (noindex·host 등) | +| `crawling.robots_clean_param` | robots.txt Clean-param (Yandex) | +| `crawling.robots_blocks_favicon_googlebot` | robots.txt 가 favicon 차단 (Googlebot-Image) | +| `crawling.sitemap_future_lastmod` | sitemap 미래 lastmod | +| `crawling.sitemap_invalid_xml` | sitemap 구조 오류 (루트·loc 없는 url·중첩 index) | +| `crawling.sitemap_extensions` | sitemap 확장 (image·video·news·hreflang) | +| `crawling.sitemap_extension_errors` | sitemap 확장 태그 오류 | +| `crawling.sitemap_news_stale` | news sitemap 의 2일 지난 기사 | +| `crawling.sitemap_blocked_by_robots` | robots.txt 가 sitemap 파일을 차단 | +| `crawling.over_googlebot_size_limit` | Googlebot 2MB 초과 (HTML·JS) | +| `crawling.conditional_request_304` | 조건부 요청 304 지원 | +| `crawling.rel_next_prev` | rel=next·prev | +| `crawling.dynamic_serving_without_vary` | UA 별 다른 HTML 인데 Vary: User-Agent 없음 | | `geo.question_headings` | 질문형 헤딩 (h2~h4) | | `geo.lists` | 목록 (항목 2개 이상 ul/ol, dl) | | `geo.tables` | 표 | | `geo.noscript_content` | noscript 대체 콘텐츠 | +| `geo.ard_manifest` | ARD 매니페스트 (AI 에이전트용 리소스 목록) | +| `geo.ai_catalog_legacy` | ARD 이전 위치 (ai-catalog) | +| `geo.webmcp_forms` | WebMCP 선언형 주석이 있는 폼 (toolname) | +| `geo.webmcp_script` | WebMCP 명령형 API 사용 흔적 (navigator.modelContext) | +| `geo.copilot_restrictions` | Copilot 인용 제한 (noarchive·nocache) | +| `geo.bing_ai_preferences` | Bing AI 학습·그라운딩 선호 표시 | +| `geo.llms_txt_link_format` | llms.txt 링크 항목 형식 오류 | +| `geo.llms_txt_extra_headings` | llms.txt 규격 밖 헤딩 | +| `geo.llms_txt_optional_section` | llms.txt Optional 섹션 | +| `geo.llms_txt_describedby` | llms.txt 연결 (rel=describedby) | +| `geo.llms_txt_subpath` | 하위 경로 llms.txt | +| `geo.content_signals` | Content-Signal (robots.txt) | +| `geo.content_usage` | AI 사용 선호 (IETF aipref Content-Usage) | +| `geo.rsl_license` | RSL 라이선스 선언 | +| `geo.tdm_policy` | TDM 정책 URL (tdm-policy) | +| `geo.tdm_reservation_invalid` | TDM 예약 값 오류 | +| `geo.a2a_agent_card` | A2A 에이전트 카드 | +| `geo.quotations` | 인용문 (blockquote·q) | +| `geo.statistics` | 수치·통계 표기 | +| `geo.future_dates` | 미래·역전된 게시일·수정일 | | `structured_data.speakable` | speakable 속성 | | `meta.canonical_target_noindex` | canonical 대상 페이지 noindex | | `meta.canonical_target_mismatch` | canonical 대상이 2xx 아님 또는 다른 canonical | +| `meta.doctype` | HTML5 doctype () | +| `meta.manifest_id` | manifest id | +| `meta.manifest_scope` | manifest scope | +| `meta.manifest_description` | manifest description | +| `meta.manifest_screenshots` | manifest screenshots | +| `meta.manifest_shortcuts` | manifest shortcuts | +| `meta.manifest_maskable_icon` | manifest maskable 아이콘 | +| `meta.manifest_colors` | manifest theme_color·background_color | +| `meta.manifest_display_valid` | manifest display 값 (fullscreen·standalone·minimal-ui·browser) | +| `meta.canonical_relative` | canonical 상대 경로 | +| `meta.favicon_relative_href` | favicon 상대 경로 | +| `meta.favicon_duplicate_rel` | 같은 rel 의 favicon 중복 | +| `meta.charset_mismatch` | 헤더·meta charset 불일치 | +| `meta.head_elements_in_body` | body 안에 있는 head 전용 요소 | +| `meta.description_same_as_title` | description 이 title 과 동일 | +| `meta.repeated_terms` | title·description 반복 단어 | +| `meta.mobile_site_canonical` | 모바일 사이트 → 데스크톱 canonical | +| `meta.bing_site_auth_file` | Bing 사이트 인증 파일 (/BingSiteAuth.xml) | +| `meta.x_ua_compatible` | X-UA-Compatible (IE 전용) | +| `meta.bom` | BOM 으로 시작하는 문서 | +| `meta.charset_not_utf8` | UTF-8 이 아닌 문자 인코딩 | +| `meta.charset_late` | 늦게 선언된 charset (1024바이트 밖·head 첫 요소 아님) | +| `meta.charset_duplicate` | charset 선언 중복 | +| `meta.viewport_invalid` | viewport 값 오류 | +| `meta.theme_color_invalid` | theme-color 값 오류 | +| `meta.manifest_name_length` | manifest name·short_name 길이 | +| `meta.manifest_file_extension` | manifest 확장자 (.webmanifest) | +| `meta.manifest_start_url_scope` | manifest start_url 범위 오류 | +| `meta.canonical_header` | canonical HTTP 헤더 (Link rel=canonical) | +| `meta.canonical_conflict` | canonical 지정 방식 간 불일치 (HTML·헤더) | +| `meta.canonical_fragment` | canonical 에 # 프래그먼트 | +| `meta.paginated_canonical_to_first` | 페이지네이션 2쪽 이상의 canonical 이 1쪽 | +| `meta.rating` | SafeSearch 성인 표시 (meta rating) | +| `meta.yandex_site_verification` | Yandex 웹마스터 인증 | +| `meta.favicon_google_eligible` | Google 파비콘 요건 (정사각형·8px 이상·형식) | +| `meta.title_half_empty` | 반쪽 title (구분자로 시작·끝남) | +| `meta.title_script_mismatch` | title 과 본문의 문자 체계 불일치 | +| `meta.apple_app_site_association_valid` | AASA 파일 요건 위반 | +| `meta.apple_itunes_app_valid` | apple-itunes-app 형식 오류 | +| `meta.bom_in_content` | 본문 중간의 BOM (U+FEFF) | +| `meta.xml_declaration` | text/html 문서의 XML 선언 | +| `meta.content_language_meta` | 폐기된 Content-Language meta | +| `meta.http_equiv_invalid` | 브라우저가 무시하는 http-equiv | +| `meta.base_after_resources` | link·script 뒤에 온 base (또는 base 여러 개) | +| `meta.mobile_alternate_mismatch` | 별도 모바일 URL 과 메타 불일치 | +| `meta.apple_touch_icon_spec` | apple-touch-icon PNG 180×180 | +| `meta.manifest_icon_size_mismatch` | manifest 아이콘의 선언 크기와 실제 크기 불일치 | | `structured_data.hreflang_reciprocal` | hreflang 상호 참조 | +| `structured_data.unknown_types` | schema.org 에 없는 @type | +| `structured_data.rdfa` | RDFa | +| `structured_data.microformats` | Microformats (hCard·hRecipe·hReview 등) | +| `structured_data.naver.postal_address` | 네이버 주소 필수 속성 | +| `structured_data.naver.breadcrumb_list` | 네이버 이동 경로 필수 속성 | +| `structured_data.naver.carousel` | 네이버 캐러셀 필수 속성 | +| `structured_data.naver.channel` | 네이버 연관 채널 필수 속성 | +| `structured_data.naver.movie` | 네이버 영화 필수 속성 | +| `structured_data.naver.aggregate_rating` | 네이버 평점 필수 속성 | +| `structured_data.naver.recipe` | 네이버 레시피 필수 속성 | +| `structured_data.naver.restaurant` | 네이버 식당 필수 속성 | +| `structured_data.naver.review` | 네이버 리뷰 필수 속성 | +| `structured_data.naver.software_app` | 네이버 소프트웨어 필수 속성 | +| `structured_data.naver.tv_series` | 네이버 TV 시리즈 필수 속성 | +| `structured_data.naver.video` | 네이버 동영상 필수 속성 | +| `structured_data.naver.video_channel` | 네이버 동영상 채널 필수 속성 | +| `structured_data.hreflang_invalid` | 잘못된 hreflang (코드·URL·media·중복) | +| `structured_data.hreflang_other_sources` | hreflang (HTTP 헤더·sitemap) | +| `structured_data.hreflang_canonical_conflict` | canonical 이 다른 언어 버전을 가리킴 | +| `structured_data.website_duplicate` | WebSite 구조화 데이터 중복 | +| `structured_data.site_name_mismatch` | WebSite.name 과 og:site_name 불일치 | +| `structured_data.is_accessible_for_free` | isAccessibleForFree (유료 콘텐츠 표시) | +| `structured_data.accessibility_metadata` | schema.org 접근성 메타데이터 | +| `structured_data.microdata_invalid` | 잘못된 microdata (itemprop·itemref·itemtype) | | `performance.external_css` | 외부 CSS 분석 | | `performance.font_face_without_display` | font-display 없는 @font-face | | `performance.page_weight` | 페이지 리소스 무게 | +| `performance.lcp_image_lazy` | 첫 이미지(LCP 후보) 지연 로딩 | +| `performance.fetchpriority_high` | fetchpriority="high" 지정 | +| `performance.document_write` | 인라인 스크립트의 document.write | +| `performance.css_import` | CSS @import | +| `performance.duplicate_scripts` | 중복으로 넣은 스크립트 | +| `performance.inline_code_bytes` | 인라인 스크립트·스타일 크기 | +| `performance.bfcache_blocked` | bfcache 차단 요인 (no-store, unload) | +| `performance.large_scripts` | 큰 스크립트 파일 (500KB 초과) | +| `performance.large_images` | 큰 이미지 파일 (500KB 초과) | +| `performance.unminified_css` | 압축(minify)되지 않은 CSS | +| `performance.large_gifs` | 큰 GIF 이미지 (100KB 초과) | +| `performance.cache_control_conflict` | Cache-Control 지시어 충돌·오류 | +| `performance.vary_accept_encoding_missing` | 압축 응답에 Vary: Accept-Encoding 없음 | +| `performance.empty_src` | 빈 src·href (페이지 자신을 다시 요청) | +| `performance.srcset_sizes_invalid` | srcset w 서술자에 sizes 누락 등 | +| `performance.preload_invalid` | 잘못된 preload (as 누락·글꼴 crossorigin 누락) | +| `performance.script_attr_ineffective` | 효과 없는·잘못된 script 속성 | +| `performance.script_json_invalid` | importmap·speculationrules JSON 오류 | +| `performance.speculation_rules` | Speculation Rules (prefetch·prerender) | +| `performance.excess_preconnect` | preconnect 4개 초과 | +| `performance.preconnect_unused` | 참조되지 않는 preconnect 출처 | +| `performance.preconnect_crossorigin_missing` | 글꼴 출처 preconnect 의 crossorigin 누락 | +| `performance.iframe_lazy` | loading=lazy 없는 iframe (첫 번째 제외) | +| `performance.third_party_embeds` | 무거운 서드파티 임베드 (파사드 후보) | +| `performance.video_preload` | preload 를 줄이지 않은 video | +| `performance.img_decoding` | decoding=async 이미지 | +| `performance.inline_style_attrs` | style 속성 사용 요소 | +| `performance.legacy_font_formats` | WOFF2 없는 글꼴 (ttf·otf·eot) | +| `performance.content_visibility` | content-visibility 사용 | +| `performance.layout_animations` | 레이아웃 속성을 움직이는 @keyframes | +| `performance.css_prefix_order` | 표준 속성 뒤의 접두사 속성 | +| `performance.server_timing` | Server-Timing 헤더 | +| `performance.link_header_preload` | Link 헤더 preload·preconnect | +| `performance.asset_compression` | 압축 없이 전달되는 CSS·JS | +| `performance.asset_redirects` | 리다이렉트되는 JS | +| `performance.unminified_js` | 압축(minify)되지 않은 JS | +| `performance.legacy_javascript` | 레거시 JS (Babel 변환·폴리필 흔적) | +| `performance.html_only_headers` | HTML 이 아닌 응답의 HTML 전용 헤더 | | `site.pages_sampled` | 표본 페이지 수집 | | `site.failed_pages` | 표본 중 2xx 아닌 페이지 | | `site.duplicate_titles` | 페이지 간 중복 title | @@ -348,3 +782,22 @@ Rust 1.88 이상 (CI에서 확인). | `transport.meta_refresh_redirect` | meta refresh 리다이렉트 (5초 이하, 따라감) | | `transport.js_redirect` | JavaScript 리다이렉트 (빈 페이지의 location 이동, 따라감) | | `transport.client_redirect_total` | 클라이언트 측 리다이렉트 수 | +| `transport.security_txt_fields` | security.txt 필수 필드 (Contact·Expires) | +| `transport.hostname_invalid` | 표준에 어긋난 호스트명 (밑줄 등) | +| `transport.hosting_subdomain` | 호스팅 제공 기본 도메인 (github.io 등) | +| `transport.redirect_hops_excess` | 리다이렉트 5회 초과·루프 | +| `transport.redirect_chain_robots_blocked` | 리다이렉트 경유 URL robots 차단 | +| `transport.hsts_invalid` | HSTS 헤더 형식 오류 | +| `transport.hsts_max_age_short` | HSTS max-age 6개월 미만 | +| `transport.hsts_preload_ineligible` | HSTS preload 요건 미충족 | +| `transport.https_to_http_redirect` | https 에서 http 로 하향 리다이렉트 | +| `transport.content_type_invalid` | Content-Type 헤더 누락·오류 | +| `transport.security_txt_expired` | security.txt 만료 | +| `transport.security_txt_invalid` | security.txt 형식 위반 | +| `transport.security_txt_signed` | security.txt 전자서명 | +| `transport.security_txt_canonical_mismatch` | security.txt Canonical 에 실제 URL 없음 | +| `transport.ua_redirect_mismatch` | UA 별 다른 최종 호스트 (교묘한 리다이렉트 의심) | +| `transport.asset_content_type_mismatch` | JavaScript 가 아닌 Content-Type 의 JS | +| `transport.http_redirect_not_https_first` | http 가 https 가 아닌 곳으로 먼저 리다이렉트 | +| `transport.http_redirect_off_host` | http 가 다른 호스트로 먼저 리다이렉트 | +| `transport.hsts_over_http` | http 응답의 HSTS 헤더 (브라우저가 무시) | diff --git a/crates/devup-access-checker-cli/Cargo.toml b/crates/devup-access-checker-cli/Cargo.toml index e1f6a88..8e420c8 100644 --- a/crates/devup-access-checker-cli/Cargo.toml +++ b/crates/devup-access-checker-cli/Cargo.toml @@ -6,7 +6,6 @@ edition.workspace = true rust-version.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true documentation.workspace = true keywords = ["seo", "geo", "accessibility", "cli", "audit"] categories = ["command-line-utilities", "web-programming"] @@ -24,3 +23,6 @@ clap = { version = "4.6", features = ["derive"] } tokio.workspace = true serde_json.workspace = true futures = "0.3" + +[dev-dependencies] +wiremock = "0.6" diff --git a/crates/devup-access-checker-cli/src/main.rs b/crates/devup-access-checker-cli/src/main.rs index 505f9b9..6decfec 100644 --- a/crates/devup-access-checker-cli/src/main.rs +++ b/crates/devup-access-checker-cli/src/main.rs @@ -1,3 +1,4 @@ +use std::io::Write; use std::process::ExitCode; use std::time::Duration; @@ -26,7 +27,7 @@ struct Cli { /// 링크 접근성 검증 생략 #[arg(long)] no_links: bool, - /// AI 크롤러 User-Agent 요청 생략 + /// AI·검색 크롤러 User-Agent 요청 생략 #[arg(long)] no_ai_ua: bool, /// HTTP→HTTPS 리다이렉트·압축 확인 생략 @@ -38,6 +39,9 @@ struct Cli { /// 여러 페이지 표본 수 (0 = 생략) #[arg(long, default_value_t = 10)] pages: usize, + /// IndexNow 키 (지정하면 키 파일을 확인) + #[arg(long)] + indexnow_key: Option, /// 대상 페이지 timeout (초) #[arg(long, default_value_t = 30)] timeout: u64, @@ -64,51 +68,52 @@ fn short_value(v: &serde_json::Value) -> String { } } -fn print_text(r: &Report, only_missing: bool) { - println!( +fn print_text(out: &mut impl Write, r: &Report, only_missing: bool) -> std::io::Result<()> { + writeln!( + out, "{} → {} (HTTP {}, {}ms)", r.url, r.final_url, r.status_code, r.duration_ms - ); + )?; let mut last: Option = None; for c in &r.checks { if only_missing && c.presence != Presence::Missing { continue; } if last != Some(c.category) { - println!("\n[{}]", c.category.label()); + writeln!(out, "\n[{}]", c.category.label())?; last = Some(c.category); } let mut line = format!(" {} {:<36} {}", mark(c.presence), c.label, c.id); if let Some(v) = &c.value { line.push_str(&format!(" = {}", short_value(v))); } - println!("{line}"); + writeln!(out, "{line}")?; if let Some(n) = &c.note { - println!(" {n}"); + writeln!(out, " {n}")?; } } let count = |p| r.checks.iter().filter(|c| c.presence == p).count(); - println!( + writeln!( + out, "\n있음 {} · 없음 {} · 판별 불가 {} · 해당 없음 {}", count(Presence::Present), count(Presence::Missing), count(Presence::Unknown), count(Presence::NotApplicable) - ); + ) } -#[tokio::main] -async fn main() -> ExitCode { - let cli = Cli::parse(); - let checker = Checker::new(Options { - page_timeout: Duration::from_secs(cli.timeout), - check_links: !cli.no_links, - check_ai_user_agents: !cli.no_ai_ua, - check_transport: !cli.no_transport, - page_samples: cli.pages, - check_resources: !cli.no_resources, - ..Default::default() - }); +/// 점검을 실행하고 결과를 쓴다. 반환값은 종료 코드 (0 성공, 2 일부 URL 실패). +async fn run(cli: Cli, out: &mut impl Write, err: &mut impl Write) -> std::io::Result { + let mut opts = Options::default(); + opts.page_timeout = Duration::from_secs(cli.timeout); + opts.check_links = !cli.no_links; + opts.check_ai_user_agents = !cli.no_ai_ua; + opts.check_transport = !cli.no_transport; + opts.page_samples = cli.pages; + opts.check_resources = !cli.no_resources; + opts.indexnow_key = cli.indexnow_key.clone(); + let checker = Checker::new(opts); // 여러 URL 은 동시에 점검하고, 출력은 입력 순서를 따른다 let results = futures::future::join_all(cli.urls.iter().map(|u| checker.check(u))).await; @@ -118,28 +123,127 @@ async fn main() -> ExitCode { match result { Ok(r) => { if let Format::Text = cli.format { - print_text(&r, cli.only_missing); - println!(); + print_text(out, &r, cli.only_missing)?; + writeln!(out)?; } reports.push(r); } Err(e) => { - eprintln!("error: {e}"); + writeln!(err, "error: {e}")?; failed = true; } } } if let Format::Json = cli.format { - let out = if reports.len() == 1 && cli.urls.len() == 1 { + let json = if reports.len() == 1 && cli.urls.len() == 1 { serde_json::to_string_pretty(&reports[0]) } else { serde_json::to_string_pretty(&reports) - }; - println!("{}", out.expect("serialize report")); + } + .map_err(std::io::Error::other)?; + writeln!(out, "{json}")?; } - if failed { - ExitCode::from(2) - } else { - ExitCode::SUCCESS + Ok(if failed { 2 } else { 0 }) +} + +#[tokio::main] +async fn main() -> ExitCode { + let code = run( + Cli::parse(), + &mut std::io::stdout().lock(), + &mut std::io::stderr().lock(), + ) + .await; + ExitCode::from(code.unwrap_or(1)) +} + +#[cfg(test)] +mod tests { + use super::*; + use wiremock::matchers::{method, path}; + use wiremock::{Mock, MockServer, ResponseTemplate}; + + async fn server() -> MockServer { + let s = MockServer::start().await; + Mock::given(method("GET")) + .and(path("/")) + .respond_with( + ResponseTemplate::new(200) + .insert_header("content-type", "text/html") + .set_body_string(format!( + "t

h

", + "긴 설명 ".repeat(30) + )), + ) + .mount(&s) + .await; + s + } + + async fn exec(args: &[&str]) -> (u8, String, String) { + let cli = Cli::parse_from( + [ + "devup-access-checker", + "--no-ai-ua", + "--no-transport", + "--pages", + "0", + ] + .iter() + .chain(args), + ); + let (mut out, mut err) = (Vec::new(), Vec::new()); + let code = run(cli, &mut out, &mut err).await.unwrap(); + ( + code, + String::from_utf8(out).unwrap(), + String::from_utf8(err).unwrap(), + ) + } + + #[tokio::test] + async fn text_output_lists_categories_values_and_notes() { + let s = server().await; + let (code, out, _) = exec(&[&s.uri()]).await; + assert_eq!(code, 0); + assert!(out.contains("[기본 메타]")); + assert!(out.contains("✓") && out.contains("✗") && out.contains("?") && out.contains("-")); + assert!(out.contains("…"), "긴 값은 줄인다"); + assert!(out.contains("있음 ")); + } + + #[tokio::test] + async fn only_missing_and_json_formats() { + let s = server().await; + let (_, out, _) = exec(&["--only-missing", &s.uri()]).await; + assert!(!out.contains(" ✓ ")); + let (_, out, _) = exec(&["-f", "json", &s.uri()]).await; + assert!( + serde_json::from_str::(&out) + .unwrap() + .is_object() + ); + let (_, out, _) = exec(&["-f", "json", &s.uri(), &s.uri()]).await; + assert!( + serde_json::from_str::(&out) + .unwrap() + .is_array() + ); + } + + #[tokio::test] + async fn unreachable_url_exits_with_2() { + let s = server().await; + let (code, _, err) = exec(&[ + "--no-links", + "--no-resources", + "--timeout", + "5", + &s.uri(), + "http://127.0.0.1:9", + ]) + .await; + assert_eq!(code, 2); + assert!(err.contains("error:")); } } diff --git a/crates/devup-access-checker-cli/tests/binary.rs b/crates/devup-access-checker-cli/tests/binary.rs new file mode 100644 index 0000000..294dc04 --- /dev/null +++ b/crates/devup-access-checker-cli/tests/binary.rs @@ -0,0 +1,20 @@ +//! 실제 바이너리의 진입점(인자 파싱, 종료 코드)을 확인한다. +use std::process::Command; + +#[test] +fn binary_reports_failure_exit_code() { + let out = Command::new(env!("CARGO_BIN_EXE_devup-access-checker")) + .args([ + "--no-ai-ua", + "--no-transport", + "--pages", + "0", + "--timeout", + "5", + "http://127.0.0.1:9", + ]) + .output() + .unwrap(); + assert_eq!(out.status.code(), Some(2)); + assert!(String::from_utf8_lossy(&out.stderr).contains("error:")); +} diff --git a/crates/devup-access-checker/Cargo.toml b/crates/devup-access-checker/Cargo.toml index 3513688..ae26c60 100644 --- a/crates/devup-access-checker/Cargo.toml +++ b/crates/devup-access-checker/Cargo.toml @@ -6,7 +6,6 @@ edition.workspace = true rust-version.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true documentation.workspace = true keywords = ["seo", "geo", "accessibility", "llms-txt", "audit"] categories = ["web-programming", "development-tools"] @@ -15,8 +14,8 @@ readme = "../../README.md" [dependencies] reqwest = { version = "0.13", default-features = false, features = ["rustls", "http2", "charset", "gzip", "brotli"] } x509-parser = "0.18" -imagesize = "0.14" -scraper = "0.24" +imagesize = "0.15" +scraper = "0.29" regex = "1" url = "2" serde.workspace = true @@ -25,6 +24,9 @@ thiserror = "2" tokio.workspace = true futures = "0.3" encoding_rs = "0.8" +flate2 = "1.1.11" +psl = "2.1.258" +unicode-normalization = "0.1.26" [dev-dependencies] wiremock = "0.6" diff --git a/crates/devup-access-checker/data/retire.json b/crates/devup-access-checker/data/retire.json new file mode 100644 index 0000000..44dfc4e --- /dev/null +++ b/crates/devup-access-checker/data/retire.json @@ -0,0 +1 @@ +{"@angular/core":{"uri":["@angular/core@(§§version§§)/"],"filename":[],"filecontent":["/\\*\\*[\\s*]+@license Angular v(§§version§§)","\\[['\"]ng-version['\"],['\"](§§version§§)['\"]\\]"],"vulnerabilities":[{"atOrAbove":"0","below":"10.2.5","severity":"medium","ids":["CVE-2021-4231","GHSA-c75v-2vq8-878f"]},{"atOrAbove":"11.0.0","below":"11.0.5","severity":"medium","ids":["CVE-2021-4231","GHSA-c75v-2vq8-878f"]},{"atOrAbove":"11.1.0-next.0","below":"11.1.0-next.3","severity":"medium","ids":["CVE-2021-4231","GHSA-c75v-2vq8-878f"]},{"atOrAbove":"0","below":"18.2.15","severity":"medium","ids":["CVE-2026-52725","GHSA-692r-grfm-v8x7"]},{"atOrAbove":"0","below":"18.2.15","severity":"medium","ids":["CVE-2026-50557","GHSA-f3m7-gqxr-g87x"]},{"atOrAbove":"0","below":"18.2.15","severity":"high","ids":["CVE-2026-27970","GHSA-prjf-86w9-mfqv"]},{"atOrAbove":"17.0.0-next.0","below":"18.2.15","severity":"high","ids":["CVE-2026-32635","GHSA-g93w-mfhg-p222"]},{"atOrAbove":"19.0.0-next.0","below":"19.2.19","severity":"high","ids":["CVE-2026-27970","GHSA-prjf-86w9-mfqv"]},{"atOrAbove":"19.0.0-next.0","below":"19.2.20","severity":"high","ids":["CVE-2026-32635","GHSA-g93w-mfhg-p222"]},{"atOrAbove":"19.0.0-next.0","below":"19.2.22","severity":"medium","ids":["CVE-2026-50557","GHSA-f3m7-gqxr-g87x"]},{"atOrAbove":"19.0.0-next.0","below":"19.2.23","severity":"medium","ids":["CVE-2026-52725","GHSA-692r-grfm-v8x7"]},{"atOrAbove":"0","below":"19.2.26","severity":"medium","ids":["CVE-2026-88057","GHSA-hh8m-fm6v-7cvg"]},{"atOrAbove":"0","below":"19.2.26","severity":"high","ids":["CVE-2026-54267","GHSA-rgjc-h3x7-9mwg"]},{"atOrAbove":"20.0.0-next.0","below":"20.3.17","severity":"high","ids":["CVE-2026-27970","GHSA-prjf-86w9-mfqv"]},{"atOrAbove":"20.0.0-next.0.0.0","below":"20.3.18","severity":"high","ids":["CVE-2026-32635","GHSA-g93w-mfhg-p222"]},{"atOrAbove":"20.0.0-next.0","below":"20.3.22","severity":"medium","ids":["CVE-2026-52725","GHSA-692r-grfm-v8x7"]},{"atOrAbove":"20.0.0-next.0","below":"20.3.22","severity":"medium","ids":["CVE-2026-50557","GHSA-f3m7-gqxr-g87x"]},{"atOrAbove":"20.0.0-next.0","below":"20.3.25","severity":"high","ids":["CVE-2026-54267","GHSA-rgjc-h3x7-9mwg"]},{"atOrAbove":"20.0.0","below":"20.3.28","severity":"medium","ids":["CVE-2026-88057","GHSA-hh8m-fm6v-7cvg"]},{"atOrAbove":"21.0.0-next.0","below":"21.1.6","severity":"high","ids":["CVE-2026-27970","GHSA-prjf-86w9-mfqv"]},{"atOrAbove":"21.2.0-next.0","below":"21.2.0","severity":"high","ids":["CVE-2026-27970","GHSA-prjf-86w9-mfqv"]},{"atOrAbove":"21.0.0-next.0","below":"21.2.4","severity":"high","ids":["CVE-2026-32635","GHSA-g93w-mfhg-p222"]},{"atOrAbove":"21.0.0-next.0","below":"21.2.15","severity":"medium","ids":["CVE-2026-52725","GHSA-692r-grfm-v8x7"]},{"atOrAbove":"21.0.0-next.0","below":"21.2.15","severity":"medium","ids":["CVE-2026-50557","GHSA-f3m7-gqxr-g87x"]},{"atOrAbove":"21.0.0-next.0","below":"21.2.17","severity":"high","ids":["CVE-2026-54267","GHSA-rgjc-h3x7-9mwg"]},{"atOrAbove":"21.0.0","below":"21.2.20","severity":"medium","ids":["CVE-2026-88057","GHSA-hh8m-fm6v-7cvg"]},{"atOrAbove":"22.0.0-next.0","below":"22.0.0-rc.2","severity":"medium","ids":["CVE-2026-52725","GHSA-692r-grfm-v8x7"]},{"atOrAbove":"22.0.0-next.0","below":"22.0.0-rc.2","severity":"medium","ids":["CVE-2026-50557","GHSA-f3m7-gqxr-g87x"]},{"atOrAbove":"22.0.0-next.0","below":"22.0.0-next.3","severity":"high","ids":["CVE-2026-32635","GHSA-g93w-mfhg-p222"]},{"atOrAbove":"22.0.0-next.0","below":"22.0.1","severity":"high","ids":["CVE-2026-54267","GHSA-rgjc-h3x7-9mwg"]},{"atOrAbove":"22.0.0","below":"22.1.0","severity":"medium","ids":["CVE-2026-88057","GHSA-hh8m-fm6v-7cvg"]}]},"AlaSQL":{"uri":["/alasql[/@](§§version§§)/.*\\.js"],"filename":["alasql-(§§version§§)(\\.min)?\\.js"],"filecontent":["/\\*!?[ \n]*AlaSQL v(§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"0.7.0","severity":"high","ids":["An arbitrary code execution exists as AlaSQL doesn't sanitize input when charact"]}]},"DOMPurify":{"uri":[],"filename":[],"filecontent":["DOMPurify.version = '(§§version§§)';","DOMPurify.version=\"(§§version§§)\"","DOMPurify=.[^\\r\\n]{10,850}?\\.version=\"(§§version§§)\"","/\\*! @license DOMPurify (§§version§§)","var .=\"dompurify\"+.{10,550}?\\.version=\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":null,"below":"0.6.1","severity":"medium","ids":[""]},{"atOrAbove":null,"below":"0.8.6","severity":"medium","ids":[""]},{"atOrAbove":null,"below":"0.8.9","severity":"low","ids":["safari UXSS"]},{"atOrAbove":null,"below":"0.9.0","severity":"low","ids":["safari UXSS"]},{"atOrAbove":"0","below":"1.0.11","severity":"medium","ids":["CVE-2019-25155","GHSA-8hgg-xxm5-3873"]},{"atOrAbove":null,"below":"2.0.3","severity":"medium","ids":["CVE-2019-16728","GHSA-chqj-j4fh-rw7m"]},{"atOrAbove":null,"below":"2.0.7","severity":"high","ids":["GHSA-mjjq-c88q-qhr6"]},{"atOrAbove":null,"below":"2.0.16","severity":"low","ids":["Fixed an mXSS-based bypass caused by nested forms inside MathML"]},{"atOrAbove":null,"below":"2.0.17","severity":"medium","ids":["CVE-2020-26870","GHSA-63q7-h895-m982"]},{"atOrAbove":null,"below":"2.1.1","severity":"low","ids":["Fixed several possible mXSS patterns, thanks @hackvertor"]},{"atOrAbove":null,"below":"2.2.0","severity":"low","ids":["Fix a possible XSS in Chrome that is hidden behind #enable-experimental-web-plat"]},{"atOrAbove":null,"below":"2.2.2","severity":"low","ids":["Fixed an mXSS bypass dropped on us publicly via"]},{"atOrAbove":null,"below":"2.2.3","severity":"low","ids":["Fixed an mXSS issue reported"]},{"atOrAbove":null,"below":"2.2.4","severity":"low","ids":["Fixed a new MathML-based bypass submitted by PewGrand. Fixed a new SVG-related b"]},{"atOrAbove":"0","below":"2.4.2","severity":"high","ids":["CVE-2024-48910","GHSA-p3vf-v8qc-cwcr"]},{"atOrAbove":"0","below":"2.5.0","severity":"high","ids":["CVE-2024-47875","GHSA-gx9m-whjm-85jf"]},{"atOrAbove":"0","below":"2.5.4","severity":"high","ids":["CVE-2024-45801","GHSA-mmhx-hmjr-r674"]},{"atOrAbove":"2.5.3","below":"2.5.9","severity":"medium","ids":["CVE-2026-0540","GHSA-v2wj-7wpq-c8vv"]},{"atOrAbove":"2.5.3","below":"2.5.9","severity":"medium","ids":["CVE-2025-15599","GHSA-v8jm-5vwx-cfxm"]},{"atOrAbove":"3.0.0","below":"3.1.3","severity":"high","ids":["CVE-2024-47875","GHSA-gx9m-whjm-85jf"]},{"atOrAbove":"3.0.0","below":"3.1.3","severity":"high","ids":["CVE-2024-45801","GHSA-mmhx-hmjr-r674"]},{"atOrAbove":"0","below":"3.2.4","severity":"medium","ids":["CVE-2025-26791","GHSA-vhxf-7vqr-mrjg"]},{"atOrAbove":"3.1.3","below":"3.2.7","severity":"medium","ids":["CVE-2025-15599","GHSA-v8jm-5vwx-cfxm"]},{"atOrAbove":"0","below":"3.3.2","severity":"medium","ids":["CVE-2026-65913","GHSA-cj63-jhhr-wcxv"]},{"atOrAbove":"0","below":"3.3.2","severity":"medium","ids":["CVE-2026-65912","GHSA-cjmm-f4jc-qw8r"]},{"atOrAbove":"0","below":"3.3.2","severity":"medium","ids":["CVE-2026-65914","GHSA-h8r8-wccr-v5f2"]},{"atOrAbove":"3.1.3","below":"3.3.2","severity":"medium","ids":["CVE-2026-0540","GHSA-v2wj-7wpq-c8vv"]},{"atOrAbove":"0","below":"3.4.0","severity":"medium","ids":["CVE-2026-65903","GHSA-39q2-94rc-95cp"]},{"atOrAbove":"0","below":"3.4.0","severity":"medium","ids":["CVE-2026-41240","GHSA-h7mw-gpvr-xq4m"]},{"atOrAbove":"1.0.10","below":"3.4.0","severity":"medium","ids":["CVE-2026-41239","GHSA-crv5-9vww-q3g8"]},{"atOrAbove":"3.0.1","below":"3.4.0","severity":"medium","ids":["CVE-2026-41238","GHSA-v9jr-rg53-9pgp"]},{"atOrAbove":"3.4.4","below":"3.4.5","severity":"high","ids":["CVE-2026-47423","GHSA-87xg-pxx2-7hvx"]},{"atOrAbove":"0","below":"3.4.6","severity":"medium","ids":["CVE-2026-49458","GHSA-hpcv-96wg-7vj8"]},{"atOrAbove":"0","below":"3.4.6","severity":"medium","ids":["CVE-2026-49459","GHSA-r47g-fvhr-h676"]},{"atOrAbove":"0","below":"3.4.7","severity":"medium","ids":["CVE-2026-65902","GHSA-76mc-f452-cxcm"]},{"atOrAbove":"0","below":"3.4.7","severity":"medium","ids":["CVE-2026-49978","GHSA-rp9w-3fw7-7cwq"]},{"atOrAbove":"0","below":"3.4.7","severity":"low","ids":["CVE-2026-65901","GHSA-x4vx-rjvf-j5p4"]},{"atOrAbove":"3.0.0","below":"3.4.8","severity":"low","ids":["CVE-2026-65900","GHSA-gvmj-g25r-r7wr"]},{"atOrAbove":"0","below":"3.4.9","severity":"low","ids":["CVE-2026-65899","GHSA-vxr8-fq34-vvx9"]},{"atOrAbove":"0","below":"3.4.11","severity":"medium","ids":["CVE-2026-65898","GHSA-cmwh-pvxp-8882"]},{"atOrAbove":"0","below":"3.4.12","severity":"low","ids":["CVE-2026-66010","GHSA-c2j3-45gr-mqc4"]},{"atOrAbove":"0","below":"3.4.13","severity":"medium","ids":["CVE-2026-75838","GHSA-55q2-fjhq-7xh7"]},{"atOrAbove":"0","below":"3.4.16","severity":"low","ids":["CVE-2026-109345","GHSA-6688-9rhm-gjv2"]},{"atOrAbove":"3.4.13","below":"3.4.16","severity":"low","ids":["CVE-2026-109344","GHSA-p98j-92pf-mc4p"]},{"atOrAbove":"0","below":"3.4.17","severity":"low","ids":["CVE-2026-116802","GHSA-c6gr-qvv4-5v3f"]},{"atOrAbove":"0","below":"3.4.17","severity":"high","ids":["CVE-2026-116803","GHSA-mrv2-3pqr-j5jr"]},{"atOrAbove":"3.4.4","below":"3.4.17","severity":"critical","ids":["CVE-2026-116804","GHSA-cg2g-xh64-v4q7"]}]},"DWR":{"uri":[],"filename":[],"filecontent":[" dwr-(§§version§§).jar"],"vulnerabilities":[{"atOrAbove":null,"below":"1.1.4","severity":"high","ids":["CVE-2007-01-09"]},{"atOrAbove":null,"below":"2.0.11","severity":"medium","ids":["CVE-2014-5326","CVE-2014-5325"]},{"atOrAbove":"3","below":"3.0.RC3","severity":"medium","ids":["CVE-2014-5326","CVE-2014-5325"]}]},"ExtJS":{"uri":["/extjs/(§§version§§)/.*\\.js"],"filename":["/ext-all-(§§version§§)(\\.min)?\\.js","/ext-all-debug-(§§version§§)(\\.min)?\\.js","/ext-base-(§§version§§)(\\.min)?\\.js"],"filecontent":["/*!\n * Ext JS Library (§§version§§)","Ext = \\{[\\s]*/\\*[^/]+/[\\s]*version *: *['\"](§§version§§)['\"]","var version *= *['\"](§§version§§)['\"], *Version;[\\s]*Ext.Version *= *Version *= *Ext.extend"],"vulnerabilities":[{"atOrAbove":"3.0.0","below":"4.0.0","severity":"medium","ids":["CVE-2010-4207","CVE-2012-5881"]},{"atOrAbove":null,"below":"6.0.0","severity":"high","ids":["CVE-2007-2285"]},{"atOrAbove":"4.0.0","below":"6.6.0","severity":"medium","ids":["CVE-2018-8046"]}]},"YUI":{"uri":[],"filename":["yui-(§§version§§)(.min)?\\.js"],"filecontent":["/*\nYUI (§§version§§)","/yui/license.(?:html|txt)\nversion: (§§version§§)"],"vulnerabilities":[{"atOrAbove":"2.4.0","below":"2.8.2","severity":"medium","ids":["CVE-2010-4207"]},{"atOrAbove":"2.5.0","below":"2.8.2","severity":"medium","ids":["CVE-2010-4208"]},{"atOrAbove":"2.8.0","below":"2.8.2","severity":"medium","ids":["CVE-2010-4209"]},{"atOrAbove":null,"below":"2.9.0","severity":"medium","ids":["CVE-2010-4710"]},{"atOrAbove":"2.4.0","below":"2.9.1","severity":"medium","ids":["CVE-2012-5881"]},{"atOrAbove":"2.5.0","below":"2.9.1","severity":"medium","ids":["CVE-2012-5882"]},{"atOrAbove":"2.8.0","below":"2.9.1","severity":"medium","ids":["CVE-2012-5883"]},{"atOrAbove":"3.2.0","below":"3.9.2","severity":"medium","ids":["CVE-2013-4941","GHSA-64r3-582j-frqm"]},{"atOrAbove":"3.2.0","below":"3.9.2","severity":"medium","ids":["CVE-2013-4942","GHSA-9ww8-j8j2-3788"]},{"atOrAbove":"3.0.0","below":"3.10.3","severity":"medium","ids":["CVE-2013-4939","GHSA-mj87-8xf8-fp4w"]},{"atOrAbove":"3.0.0","below":"3.10.11","severity":"medium","ids":["CVE-2013-4940","GHSA-x5hj-47vv-53p8"]},{"atOrAbove":"3.10.12","below":"3.10.13","severity":"medium","ids":["CVE-2013-4940","GHSA-x5hj-47vv-53p8"]}]},"alpinejs":{"uri":["/alpinejs[@/](§§version§§)/"],"filename":["alpine(?:js)?[-.](§§version§§)(.min)?.js"],"filecontent":["version:['\"](§§version§§)['\"],flushAndStopDeferringMutations"],"vulnerabilities":[]},"angularjs":{"uri":["/(§§version§§)/angular(\\.min)?\\.js"],"filename":["angular(?:js)?-(§§version§§)(.min)?\\.js"],"filecontent":["/\\*[\\*\\s]+(?:@license )?AngularJS(?: NES)? v(§§version§§)","http://errors\\.angularjs\\.org/(§§version§§)/"],"vulnerabilities":[{"atOrAbove":"1.0.0","below":"1.2.30","severity":"medium","ids":["The attribute usemap can be used as a security exploit"]},{"atOrAbove":null,"below":"1.5.0-beta.1","severity":"medium","ids":["CVE-2019-14863","GHSA-r5fx-8r73-v86c"]},{"atOrAbove":"1.3.0","below":"1.5.0-rc2","severity":"medium","ids":["The attribute usemap can be used as a security exploit"]},{"atOrAbove":null,"below":"1.6.0","severity":"medium","ids":["GHSA-28hp-fgcr-2r4h"]},{"atOrAbove":null,"below":"1.6.3","severity":"medium","ids":["DOS in $sanitize"]},{"atOrAbove":null,"below":"1.6.3","severity":"medium","ids":["Universal CSP bypass via add-on in Firefox"]},{"atOrAbove":null,"below":"1.6.5","severity":"low","ids":["XSS in $sanitize in Safari/Firefox"]},{"atOrAbove":"1.5.0","below":"1.6.9","severity":"low","ids":["XSS through SVG if enableSvg is set"]},{"atOrAbove":null,"below":"1.7.9","severity":"high","ids":["CVE-2019-10768","GHSA-89mq-4x47-5v83"]},{"atOrAbove":null,"below":"1.8.0","severity":"medium","ids":["GHSA-5cp4-xmrw-59wf"]},{"atOrAbove":null,"below":"1.8.0","severity":"medium","ids":["CVE-2020-7676","GHSA-mhp6-pxh8-r675"]},{"atOrAbove":null,"below":"1.8.4","severity":"medium","ids":["CVE-2023-26117","GHSA-2qqx-w9hr-q5gx"]},{"atOrAbove":null,"below":"1.8.4","severity":"medium","ids":["CVE-2023-26116","GHSA-2vrf-hf26-jrp5"]},{"atOrAbove":null,"below":"1.8.4","severity":"medium","ids":["CVE-2022-25869","GHSA-prc3-vjfx-vhm9"]},{"atOrAbove":null,"below":"1.8.4","severity":"medium","ids":["CVE-2023-26118","GHSA-qwqh-hm9m-p5hr"]},{"atOrAbove":"0","below":"1.8.4","severity":"low","ids":["CVE-2025-0716","GHSA-j58c-ww9w-pwp5"]},{"atOrAbove":"0","below":"1.8.4","severity":"low","ids":["CVE-2024-8373","GHSA-mqm9-c95h-x2p6"]},{"atOrAbove":"1.2.0-rc.3","below":"1.8.4","severity":"high","ids":["CVE-2026-11998","GHSA-7x27-g8rg-x87w"]},{"atOrAbove":"1.3.0","below":"1.8.4","severity":"high","ids":["CVE-2024-21490","GHSA-4w4v-5hc9-xrr2"]},{"atOrAbove":"1.3.0-rc.4","below":"1.8.4","severity":"low","ids":["CVE-2024-8372","GHSA-m9gf-397r-hwpg"]},{"atOrAbove":"1.3.1","below":"1.8.4","severity":"medium","ids":["CVE-2025-2336","GHSA-4p4w-6hg8-63wx"]},{"atOrAbove":"0","below":"1.9.9","severity":"medium","ids":["CVE-2025-4690","GHSA-hfff-63hg-f47j"]},{"atOrAbove":null,"below":"1.999","severity":"low","ids":["End-of-Life: Long term support for AngularJS has been discontinued as of Decembe"]},{"atOrAbove":"1.7.0","below":"999.999.999","severity":"medium","ids":["CVE-2022-25844","GHSA-m2h2-264f-f486"]}]},"axios":{"uri":["/axios/(§§version§§)/.*\\.js"],"filename":["axios-(§§version§§)(\\.min)?\\.js"],"filecontent":["/\\*!? *[Aa]xios v(§§version§§) ","// Axios v(§§version§§) C","return\"\\[Axios v(§§version§§)\\] Transitional","\\\"axios\\\",\\\"version\\\":\\\"(§§version§§)\\\""],"vulnerabilities":[{"atOrAbove":null,"below":"0.18.1","severity":"high","ids":["CVE-2019-10742","GHSA-42xw-2xvc-qx8m"]},{"atOrAbove":null,"below":"0.21.1","severity":"medium","ids":["CVE-2020-28168","GHSA-4w2v-q235-vp99"]},{"atOrAbove":null,"below":"0.21.2","severity":"high","ids":["CVE-2021-3749","GHSA-cph5-m8f7-6c5x"]},{"atOrAbove":"0.8.1","below":"0.28.0","severity":"medium","ids":["CVE-2023-45857","GHSA-wf5p-g6vw-rhxx"]},{"atOrAbove":"0","below":"0.30.0","severity":"high","ids":["CVE-2025-27152","GHSA-jr5f-v2jv-69x6"]},{"atOrAbove":"0.28.0","below":"0.30.2","severity":"high","ids":["CVE-2025-58754","GHSA-4hjh-wcwx-xvwj"]},{"atOrAbove":"0","below":"0.30.3","severity":"high","ids":["CVE-2026-25639","GHSA-43fc-jf86-j433"]},{"atOrAbove":"0","below":"0.31.0","severity":"critical","ids":["CVE-2025-62718","GHSA-3p68-rc4w-qgx5"]},{"atOrAbove":"0","below":"0.31.0","severity":"critical","ids":["CVE-2026-40175","GHSA-fvcv-3m26-pcqx"]},{"atOrAbove":"0.19.0","below":"0.31.1","severity":"high","ids":["CVE-2026-44495","GHSA-3g43-6gmg-66jw"]},{"atOrAbove":"0","below":"0.31.1","severity":"medium","ids":["CVE-2026-42034","GHSA-5c9x-8gcm-mpgx"]},{"atOrAbove":"0","below":"0.31.1","severity":"medium","ids":["CVE-2026-42039","GHSA-62hf-57xw-28j9"]},{"atOrAbove":"0","below":"0.31.1","severity":"high","ids":["CVE-2026-42035","GHSA-6chq-wfr3-2hj9"]},{"atOrAbove":"0","below":"0.31.1","severity":"medium","ids":["CVE-2026-42038","GHSA-m7pr-hjqh-92cm"]},{"atOrAbove":"0","below":"0.31.1","severity":"high","ids":["CVE-2026-42033","GHSA-pf86-5x62-jrwf"]},{"atOrAbove":"0","below":"0.31.1","severity":"high","ids":["CVE-2026-42043","GHSA-pmwg-cvhr-8vh7"]},{"atOrAbove":"0","below":"0.31.1","severity":"medium","ids":["CVE-2026-42036","GHSA-vf2m-468p-8v99"]},{"atOrAbove":"0","below":"0.31.1","severity":"medium","ids":["CVE-2026-42041","GHSA-w9j2-pvgh-6h63"]},{"atOrAbove":"0","below":"0.31.1","severity":"low","ids":["CVE-2026-42040","GHSA-xhjh-pmcv-23jw"]},{"atOrAbove":"0","below":"0.31.1","severity":"medium","ids":["CVE-2026-42042","GHSA-xx6v-rp6x-q39c"]},{"atOrAbove":"0","below":"0.32.0","severity":"medium","ids":["CVE-2026-44490","GHSA-898c-q2cr-xwhg"]},{"atOrAbove":"0","below":"0.32.0","severity":"high","ids":["CVE-2026-44496","GHSA-hfxv-24rg-xrqf"]},{"atOrAbove":"0","below":"0.32.0","severity":"high","ids":["CVE-2026-44486","GHSA-j5f8-grm9-p9fc"]},{"atOrAbove":"0","below":"0.32.0","severity":"high","ids":["CVE-2026-44487","GHSA-p92q-9vqr-4j8v"]},{"atOrAbove":"0","below":"0.32.0","severity":"high","ids":["CVE-2026-44492","GHSA-pjwm-pj3p-43mv"]},{"atOrAbove":"0.8.0","below":"0.33.0","severity":"medium","ids":["CVE-2026-67319","GHSA-7q8q-rj6j-mhjq"]},{"atOrAbove":"0.28.0","below":"0.33.0","severity":"medium","ids":["CVE-2026-67313","GHSA-42h9-826w-cgv3"]},{"atOrAbove":"0.31.0","below":"0.33.0","severity":"medium","ids":["CVE-2026-67315","GHSA-f4gw-2p7v-4548"]},{"atOrAbove":"0.31.1","below":"0.33.0","severity":"high","ids":["CVE-2026-67320","GHSA-gcfj-64vw-6mp9"]},{"atOrAbove":"0.31.1","below":"0.33.0","severity":"medium","ids":["CVE-2026-67321","GHSA-hcpx-6fm6-wx23"]},{"atOrAbove":"0","below":"0.33.0","severity":"medium","ids":["CVE-2026-67316","GHSA-mmx7-hfxf-jppx"]},{"atOrAbove":"0.28.0","below":"0.33.0","severity":"medium","ids":["CVE-2026-67312","GHSA-pmv8-rq9r-6j72"]},{"atOrAbove":"0.27.2","below":"0.34.0","severity":"medium","ids":["CVE-2026-101902","GHSA-9fr6-4gfg-395g"]},{"atOrAbove":"0.28.0","below":"0.34.0","severity":"high","ids":["CVE-2026-101909","GHSA-x97p-jq2g-jp4f"]},{"atOrAbove":"1.0.0","below":"1.6.0","severity":"medium","ids":["CVE-2023-45857","GHSA-wf5p-g6vw-rhxx"]},{"atOrAbove":null,"below":"1.6.8","severity":"medium","ids":["Versions before 1.6.8 depends on follow-redirects before 1.15.6 which could leak"]},{"atOrAbove":"1.3.2","below":"1.7.4","severity":"high","ids":["CVE-2024-39338","GHSA-8hc4-vh64-cxmj"]},{"atOrAbove":"1.0.0","below":"1.8.2","severity":"high","ids":["CVE-2025-27152","GHSA-jr5f-v2jv-69x6"]},{"atOrAbove":"1.0.0","below":"1.12.0","severity":"high","ids":["CVE-2025-58754","GHSA-4hjh-wcwx-xvwj"]},{"atOrAbove":"1.13.0","below":"1.13.2","severity":"medium","ids":["CVE-2026-39865","GHSA-qj83-cq47-w5f8"]},{"atOrAbove":"1.0.0","below":"1.13.5","severity":"high","ids":["CVE-2026-25639","GHSA-43fc-jf86-j433"]},{"atOrAbove":"1.0.0","below":"1.15.0","severity":"critical","ids":["CVE-2025-62718","GHSA-3p68-rc4w-qgx5"]},{"atOrAbove":"1.0.0","below":"1.15.0","severity":"critical","ids":["CVE-2026-40175","GHSA-fvcv-3m26-pcqx"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"medium","ids":["CVE-2026-42037","GHSA-445q-vr5w-6q77"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"medium","ids":["CVE-2026-42034","GHSA-5c9x-8gcm-mpgx"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"medium","ids":["CVE-2026-42039","GHSA-62hf-57xw-28j9"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"high","ids":["CVE-2026-42035","GHSA-6chq-wfr3-2hj9"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"medium","ids":["CVE-2026-42038","GHSA-m7pr-hjqh-92cm"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"high","ids":["CVE-2026-42033","GHSA-pf86-5x62-jrwf"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"high","ids":["CVE-2026-42043","GHSA-pmwg-cvhr-8vh7"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"medium","ids":["CVE-2026-42036","GHSA-vf2m-468p-8v99"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"medium","ids":["CVE-2026-42041","GHSA-w9j2-pvgh-6h63"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"low","ids":["CVE-2026-42040","GHSA-xhjh-pmcv-23jw"]},{"atOrAbove":"1.0.0","below":"1.15.1","severity":"medium","ids":["CVE-2026-42042","GHSA-xx6v-rp6x-q39c"]},{"atOrAbove":"1.0.0","below":"1.15.2","severity":"high","ids":["CVE-2026-44495","GHSA-3g43-6gmg-66jw"]},{"atOrAbove":"1.0.0","below":"1.15.2","severity":"medium","ids":["CVE-2026-42044","GHSA-3w6x-2g7m-8v23"]},{"atOrAbove":"1.0.0","below":"1.15.2","severity":"high","ids":["CVE-2026-42264","GHSA-q8qp-cvcw-x6jj"]},{"atOrAbove":"1.0.0","below":"1.16.0","severity":"high","ids":["CVE-2026-44494","GHSA-35jp-ww65-95wh"]},{"atOrAbove":"1.0.0","below":"1.16.0","severity":"medium","ids":["CVE-2026-44490","GHSA-898c-q2cr-xwhg"]},{"atOrAbove":"1.0.0","below":"1.16.0","severity":"high","ids":["CVE-2026-44496","GHSA-hfxv-24rg-xrqf"]},{"atOrAbove":"1.0.0","below":"1.16.0","severity":"high","ids":["CVE-2026-44486","GHSA-j5f8-grm9-p9fc"]},{"atOrAbove":"1.0.0","below":"1.16.0","severity":"high","ids":["CVE-2026-44487","GHSA-p92q-9vqr-4j8v"]},{"atOrAbove":"1.7.0","below":"1.16.0","severity":"high","ids":["CVE-2026-44488","GHSA-777c-7fjr-54vf"]},{"atOrAbove":"1.15.0","below":"1.16.0","severity":"high","ids":["CVE-2026-44492","GHSA-pjwm-pj3p-43mv"]},{"atOrAbove":"1.15.2","below":"1.16.0","severity":"low","ids":["CVE-2026-44489","GHSA-654m-c8p4-x5fp"]},{"atOrAbove":"1.0.0","below":"1.18.0","severity":"medium","ids":["CVE-2026-67313","GHSA-42h9-826w-cgv3"]},{"atOrAbove":"1.0.0","below":"1.18.0","severity":"medium","ids":["CVE-2026-67319","GHSA-7q8q-rj6j-mhjq"]},{"atOrAbove":"1.0.0","below":"1.18.0","severity":"medium","ids":["CVE-2026-67316","GHSA-mmx7-hfxf-jppx"]},{"atOrAbove":"1.0.0","below":"1.18.0","severity":"medium","ids":["CVE-2026-67312","GHSA-pmv8-rq9r-6j72"]},{"atOrAbove":"1.7.0","below":"1.18.0","severity":"medium","ids":["CVE-2026-67317","GHSA-jqh4-m9w3-8hp9"]},{"atOrAbove":"1.13.0","below":"1.18.0","severity":"medium","ids":["CVE-2026-67318","GHSA-mwf2-3pr3-8698"]},{"atOrAbove":"1.15.0","below":"1.18.0","severity":"medium","ids":["CVE-2026-67315","GHSA-f4gw-2p7v-4548"]},{"atOrAbove":"1.15.1","below":"1.18.0","severity":"medium","ids":["CVE-2026-67321","GHSA-hcpx-6fm6-wx23"]},{"atOrAbove":"1.15.2","below":"1.18.0","severity":"high","ids":["CVE-2026-67320","GHSA-gcfj-64vw-6mp9"]},{"atOrAbove":"1.15.2","below":"1.18.0","severity":"medium","ids":["CVE-2026-67314","GHSA-xj6q-8x83-jv6g"]},{"atOrAbove":"1.0.0","below":"1.20.0","severity":"medium","ids":["CVE-2026-101902","GHSA-9fr6-4gfg-395g"]},{"atOrAbove":"1.0.0","below":"1.20.0","severity":"medium","ids":["CVE-2026-101904","GHSA-j8rh-479h-cp32"]},{"atOrAbove":"1.7.0","below":"1.20.0","severity":"medium","ids":["CVE-2026-101908","GHSA-vh66-26gq-q6x8"]},{"atOrAbove":"1.12.0","below":"1.20.0","severity":"medium","ids":["CVE-2026-101900","GHSA-4hqw-qxg8-jxx2"]},{"atOrAbove":"1.13.0","below":"1.20.0","severity":"high","ids":["CVE-2026-101898","GHSA-3pq3-5fj3-cg6v"]},{"atOrAbove":"1.13.0","below":"1.20.0","severity":"high","ids":["CVE-2026-101901","GHSA-542g-h47m-68v8"]},{"atOrAbove":"1.15.0","below":"1.20.0","severity":"medium","ids":["CVE-2026-101899","GHSA-44g4-m2mj-wpvx"]},{"atOrAbove":"1.15.0","below":"1.20.0","severity":"high","ids":["CVE-2026-101906","GHSA-mghh-pgcx-3jjj"]},{"atOrAbove":"1.15.1","below":"1.20.0","severity":"high","ids":["CVE-2026-101909","GHSA-x97p-jq2g-jp4f"]},{"atOrAbove":"1.15.2","below":"1.20.0","severity":"high","ids":["CVE-2026-101905","GHSA-m8m8-qj5v-23w3"]},{"atOrAbove":"1.16.1","below":"1.20.0","severity":"high","ids":["CVE-2026-101903","GHSA-c29m-xwm3-cm6r"]},{"atOrAbove":"1.17.0","below":"1.20.0","severity":"high","ids":["CVE-2026-101907","GHSA-r4gj-5m52-g5wh"]}]},"backbone.js":{"uri":["/(§§version§§)/backbone(\\.min)?\\.js"],"filename":["backbone(?:js)?-(§§version§§)(.min)?\\.js"],"filecontent":["//[ ]+Backbone.js (§§version§§)","a=t.Backbone=\\{\\}\\}a.VERSION=\"(§§version§§)\"","Backbone\\.VERSION *= *[\"'](§§version§§)[\"']"],"vulnerabilities":[{"atOrAbove":"0.3.3","below":"0.5.0","severity":"medium","ids":["CVE-2016-10537","GHSA-j6p2-cx3w-6jcp"]}]},"blueimp-file-upload":{"uri":["/blueimp-file-upload/(§§version§§)/jquery.fileupload(-ui)?(\\.min)?\\.js"],"filename":[],"filecontent":["/\\*[\\s*]+jQuery File Upload User Interface Plugin (§§version§§)[\\s*]+https://github.com/blueimp"],"vulnerabilities":[{"atOrAbove":null,"below":"9.22.1","severity":"high","ids":["CVE-2018-9206","GHSA-4cj8-g9cp-v5wr"]}]},"bootstrap":{"uri":["/(§§version§§)/bootstrap(\\.min)?\\.js","/(§§version§§)/js/bootstrap(\\.min)?\\.js"],"filename":["bootstrap-(§§version§§)(\\.min)?\\.js"],"filecontent":["/\\*!? Bootstrap v(§§version§§)","\\* Bootstrap v(§§version§§)","/\\*! Bootstrap v(§§version§§)","this\\.close\\)\\};.\\.VERSION=\"(§§version§§)\"(?:,.\\.TRANSITION_DURATION=150)?,.\\.prototype\\.close"],"vulnerabilities":[{"atOrAbove":null,"below":"2.1.0","severity":"medium","ids":["cross-site scripting vulnerability"]},{"atOrAbove":null,"below":"3.4.0","severity":"medium","ids":["CVE-2018-20676","GHSA-3mgp-fx93-9xv5"]},{"atOrAbove":null,"below":"3.4.0","severity":"medium","ids":["CVE-2018-20677","GHSA-ph58-4vrj-w6hr"]},{"atOrAbove":"2.3.0","below":"3.4.0","severity":"medium","ids":["CVE-2018-14040","GHSA-3wqf-4x89-9g79"]},{"atOrAbove":"2.3.0","below":"3.4.0","severity":"medium","ids":["CVE-2018-14042","GHSA-7mvr-5x2g-wfc8"]},{"atOrAbove":"3.0.0","below":"3.4.0","severity":"medium","ids":["CVE-2016-10735","GHSA-4p24-vmcr-4gqj"]},{"atOrAbove":"3.0.0","below":"3.4.1","severity":"medium","ids":["CVE-2019-8331","GHSA-9v3m-8fp8-mj99"]},{"atOrAbove":"1.4.0","below":"3.4.2","severity":"medium","ids":["CVE-2024-6485","GHSA-vxmc-5x29-h64v"]},{"atOrAbove":"3.4.1","below":"3.4.2","severity":"medium","ids":["CVE-2025-1647","GHSA-q58r-hwc8-rm9j"]},{"atOrAbove":null,"below":"3.999.999","severity":"low","ids":["Bootstrap before 4.0.0 is end-of-life and no longer maintained."]},{"atOrAbove":"4.0.0-beta","below":"4.0.0-beta.2","severity":"medium","ids":["CVE-2016-10735","GHSA-4p24-vmcr-4gqj"]},{"atOrAbove":"4.0.0","below":"4.1.2","severity":"medium","ids":["CVE-2018-14040","GHSA-3wqf-4x89-9g79"]},{"atOrAbove":"4.0.0","below":"4.1.2","severity":"medium","ids":["CVE-2018-14042","GHSA-7mvr-5x2g-wfc8"]},{"atOrAbove":"4.0.0","below":"4.1.2","severity":"medium","ids":["CVE-2018-14041","GHSA-pj7m-g53m-7638"]},{"atOrAbove":"4.0.0","below":"4.3.1","severity":"medium","ids":["CVE-2019-8331","GHSA-9v3m-8fp8-mj99"]}]},"bootstrap-select":{"uri":["/bootstrap-select/(§§version§§)/"],"filename":[],"filecontent":["/\\*![\\s]+\\*[\\s]+Bootstrap-select[\\s]+v(§§version§§)",".\\.data\\(\"selectpicker\",.=new .\\(this,.\\)\\)\\}\"string\"==typeof .&&\\(.=.\\[.\\]instanceof Function\\?.\\[.\\]\\.apply\\(.,.\\):.\\.options\\[.\\]\\)\\}\\}\\);return void 0!==.\\?.:.\\}.\\.VERSION=\"(§§version§§)\","],"vulnerabilities":[{"atOrAbove":null,"below":"1.13.6","severity":"medium","ids":["CVE-2019-20921","GHSA-7c82-mp33-r854"]},{"atOrAbove":null,"below":"1.13.6","severity":"high","ids":["CVE-2019-20921","GHSA-9r7h-6639-v5mw"]}]},"c3":{"uri":["/(§§version§§)/c3(\\.min)?\\.js"],"filename":[],"filecontent":["[\\s]+var c3 ?= ?\\{ ?version: ?['\"](§§version§§)['\"] ?\\};[\\s]+var c3_chart_fn,"],"vulnerabilities":[{"atOrAbove":null,"below":"0.4.11","severity":"medium","ids":["CVE-2016-1000240","GHSA-gvg7-pp82-cff3"]}]},"chart.js":{"uri":["/Chart.js/(§§version§§)/chart(\\.min)?\\.js","/Chart.js/(§§version§§)/Chart.bundle(\\.min)?\\.js"],"filename":[],"filecontent":["var version=\"(§§version§§)\";const KNOWN_POSITIONS=\\[\"top\",\"bottom\",\"left\",\"right\",\"chartArea\"\\]","/\\*![\\s]+\\* Chart.js v(§§version§§)","/\\*![\\s]+\\* Chart.js[\\s]+\\* http://chartjs.org/[\\s]+\\* Version: (§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"2.9.4","severity":"high","ids":["CVE-2020-7746","GHSA-h68q-55jf-x68w"]}]},"ckeditor":{"uri":["/(§§version§§)/ckeditor(\\.min)?\\.js"],"filename":["ckeditor-(§§version§§)(\\.min)?\\.js"],"filecontent":["ckeditor..js.{4,30}=\\{timestamp:\"[^\"]+\",version:\"(§§version§§)","window\\.CKEDITOR=function\\(\\)\\{var [a-z]=\\{timestamp:\"[^\"]+\",version:\"(§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"4.4.3","severity":"medium","ids":["XSS"]},{"atOrAbove":null,"below":"4.4.6","severity":"medium","ids":["XSS"]},{"atOrAbove":null,"below":"4.4.8","severity":"medium","ids":["XSS"]},{"atOrAbove":null,"below":"4.5.11","severity":"medium","ids":["XSS"]},{"atOrAbove":"4.5.11","below":"4.9.2","severity":"medium","ids":["XSS if the enhanced image plugin is installed"]},{"atOrAbove":"4.0.0","below":"4.11.0","severity":"medium","ids":["CVE-2018-17960","GHSA-g68x-vvqq-pvw3"]},{"atOrAbove":null,"below":"4.14.0","severity":"low","ids":["XSS"]},{"atOrAbove":null,"below":"4.15.1","severity":"medium","ids":["XSS-type attack inside CKEditor 4 by persuading a victim to paste a specially cr"]},{"atOrAbove":null,"below":"4.16.0","severity":"low","ids":["ReDoS vulnerability in Autolink plugin and Advanced Tab for Dialogs plugin"]},{"atOrAbove":null,"below":"4.16.2","severity":"low","ids":["CVE-2021-32808"]},{"atOrAbove":null,"below":"4.16.2","severity":"low","ids":["CVE-2021-32809"]},{"atOrAbove":null,"below":"4.16.2","severity":"medium","ids":["CVE-2021-37695"]},{"atOrAbove":null,"below":"4.17.0","severity":"medium","ids":["CVE-2021-41164","CVE-2021-41165"]},{"atOrAbove":null,"below":"4.18.0","severity":"low","ids":["CVE-2022-24728"]},{"atOrAbove":null,"below":"4.21.0","severity":"medium","ids":["CVE-2023-28439"]}]},"ckeditor5":{"uri":["/(§§version§§)/ckeditor5(\\.min)?\\.js"],"filename":["ckeditor5-(§§version§§)(\\.min)?\\.js"],"filecontent":["const .=\"(§§version§§)\"[,;].{0,140}?\\.CKEDITOR_VERSION=.;","CKEDITOR_VERSION=\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":null,"below":"10.0.1","severity":"low","ids":["CVE-2018-11093"]},{"atOrAbove":null,"below":"25.0.0","severity":"low","ids":["CVE-2021-21254"]},{"atOrAbove":null,"below":"27.0.0","severity":"low","ids":["CVE-2021-21391"]},{"atOrAbove":null,"below":"35.0.0","severity":"low","ids":["CVE-2022-31175"]},{"atOrAbove":"40.0.0","below":"43.1.1","severity":"medium","ids":["CVE-2024-45613","GHSA-rgg8-g5x8-wr9v"]},{"atOrAbove":"44.2.0","below":"45.2.2","severity":"low","ids":["CVE-2025-58064","GHSA-x9gp-vjh6-3wv6"]},{"atOrAbove":"46.0.0","below":"46.0.3","severity":"low","ids":["CVE-2025-58064","GHSA-x9gp-vjh6-3wv6"]},{"atOrAbove":"29.0.0","below":"47.7.4","severity":"low","ids":["CVE-2026-116687","GHSA-v6mg-96c6-gmpq"]},{"atOrAbove":"45.0.0","below":"47.7.4","severity":"high","ids":["CVE-2026-116688","GHSA-rh54-vffm-5fvp"]},{"atOrAbove":"48.0.0","below":"48.5.1","severity":"high","ids":["CVE-2026-116688","GHSA-rh54-vffm-5fvp"]},{"atOrAbove":"48.0.0","below":"48.5.1","severity":"low","ids":["CVE-2026-116687","GHSA-v6mg-96c6-gmpq"]}]},"d3":{"uri":["/d3[@/](§§version§§)/d3.(min.)?js"],"filename":["d3[-.](§§version§§)(.min)?.js"],"filecontent":["\\/\\/ https:\\/\\/d3js\\.org (?:v|Version )(§§version§§) "],"vulnerabilities":[]},"dojo":{"uri":["/(?:dojo-)?(§§version§§)(?:/dojo)?/dojo(\\.min)?\\.js"],"filename":["dojo-(§§version§§)(\\.min)?\\.js"],"filecontent":[],"vulnerabilities":[{"atOrAbove":null,"below":"1.1.0","severity":"medium","ids":["CVE-2008-6681","GHSA-39cx-xcwj-3rc4"]},{"atOrAbove":null,"below":"1.2.0","severity":"medium","ids":["CVE-2015-5654","GHSA-p82g-2xpp-m5r3"]},{"atOrAbove":null,"below":"1.4.2","severity":"medium","ids":["CVE-2010-2275"]},{"atOrAbove":"1.10.0","below":"1.10.10","severity":"medium","ids":["CVE-2010-2273","GHSA-536q-8gxx-m782"]},{"atOrAbove":"1.11.0","below":"1.11.6","severity":"medium","ids":["CVE-2010-2273","GHSA-536q-8gxx-m782"]},{"atOrAbove":null,"below":"1.11.10","severity":"high","ids":["CVE-2020-5258","GHSA-jxfh-8wgv-vfr2"]},{"atOrAbove":"1.12.0","below":"1.12.4","severity":"medium","ids":["CVE-2010-2273","GHSA-536q-8gxx-m782"]},{"atOrAbove":"1.12.0","below":"1.12.8","severity":"high","ids":["CVE-2020-5258","GHSA-jxfh-8wgv-vfr2"]},{"atOrAbove":"1.13.0","below":"1.13.1","severity":"medium","ids":["CVE-2010-2273","GHSA-536q-8gxx-m782"]},{"atOrAbove":"1.13.0","below":"1.13.7","severity":"high","ids":["CVE-2020-5258","GHSA-jxfh-8wgv-vfr2"]},{"atOrAbove":"1.14.0","below":"1.14.6","severity":"high","ids":["CVE-2020-5258","GHSA-jxfh-8wgv-vfr2"]},{"atOrAbove":"1.15.0","below":"1.15.3","severity":"high","ids":["CVE-2020-5258","GHSA-jxfh-8wgv-vfr2"]},{"atOrAbove":"1.16.0","below":"1.16.2","severity":"high","ids":["CVE-2020-5258","GHSA-jxfh-8wgv-vfr2"]},{"atOrAbove":"0","below":"1.16.5","severity":"high","ids":["CVE-2021-23450","GHSA-m8gw-hjpr-rjv7"]}]},"dojox":{"uri":["/(?:dojo-release-)?(§§version§§)(?:-src)?/dojox/.+\\.js","/dojox@(§§version§§)/.+\\.js"],"filename":[],"filecontent":[],"vulnerabilities":[{"atOrAbove":"0","below":"1.11.9","severity":"medium","ids":["CVE-2019-10785","GHSA-pg97-ww7h-5mjr"]},{"atOrAbove":"0","below":"1.11.10","severity":"low","ids":["CVE-2020-5259","GHSA-3hw5-q855-g6cw"]},{"atOrAbove":"1.12.0","below":"1.12.7","severity":"medium","ids":["CVE-2019-10785","GHSA-pg97-ww7h-5mjr"]},{"atOrAbove":"1.12.0","below":"1.12.8","severity":"low","ids":["CVE-2020-5259","GHSA-3hw5-q855-g6cw"]},{"atOrAbove":"1.13.0","below":"1.13.6","severity":"medium","ids":["CVE-2019-10785","GHSA-pg97-ww7h-5mjr"]},{"atOrAbove":"1.13.0","below":"1.13.7","severity":"low","ids":["CVE-2020-5259","GHSA-3hw5-q855-g6cw"]},{"atOrAbove":null,"below":"1.14.0","severity":"critical","ids":["CVE-2018-15494","GHSA-84cm-x2q5-8225"]},{"atOrAbove":"1.14.0","below":"1.14.5","severity":"medium","ids":["CVE-2019-10785","GHSA-pg97-ww7h-5mjr"]},{"atOrAbove":"1.14.0","below":"1.14.6","severity":"low","ids":["CVE-2020-5259","GHSA-3hw5-q855-g6cw"]},{"atOrAbove":"1.15.0","below":"1.15.2","severity":"medium","ids":["CVE-2019-10785","GHSA-pg97-ww7h-5mjr"]},{"atOrAbove":"1.15.0","below":"1.15.3","severity":"low","ids":["CVE-2020-5259","GHSA-3hw5-q855-g6cw"]},{"atOrAbove":"1.16.0","below":"1.16.1","severity":"medium","ids":["CVE-2019-10785","GHSA-pg97-ww7h-5mjr"]},{"atOrAbove":"1.16.0","below":"1.16.2","severity":"low","ids":["CVE-2020-5259","GHSA-3hw5-q855-g6cw"]}]},"dont check":{"uri":["^http[s]?://(ssl|www).google-analytics.com/ga.js","^http[s]?://apis.google.com/js/plusone.js","^http[s]?://cdn.cxense.com/cx.js"],"filename":[],"filecontent":[],"vulnerabilities":[]},"easyXDM":{"uri":["/(?:easyXDM-)?(§§version§§)/easyXDM(\\.min)?\\.js"],"filename":["easyXDM-(§§version§§)(.min)?\\.js"],"filecontent":[" \\* easyXDM\n \\* http://easyxdm.net/(?:\r|\n|.)+version:\"(§§version§§)\"","@class easyXDM(?:.|\r|\n)+@version (§§version§§)(\r|\n)"],"vulnerabilities":[{"atOrAbove":null,"below":"2.4.18","severity":"medium","ids":["CVE-2013-5212"]},{"atOrAbove":null,"below":"2.4.19","severity":"medium","ids":["CVE-2014-1403"]},{"atOrAbove":null,"below":"2.4.20","severity":"medium","ids":["This release fixes a potential XSS for IE running in compatibility mode."]},{"atOrAbove":null,"below":"2.5.0","severity":"medium","ids":["This tightens down the default origin whitelist in the CORS example."]}]},"echarts":{"uri":["/echarts[@/](§§version§§)/"],"filename":["echarts[-.](§§version§§)(.min)?.js"],"filecontent":["'(§§version§§)';[\\s]+var dependencies = \\{[\\s]+zrender: '[0-9.]+'[\\s]+\\};[\\s]+var TEST_FRAME_REMAIN_TIME = 1;","setPlatformAPI=[a-zA-Z_]+,.\\.throttle=[a-zA-Z_]+,.\\.time=[a-zA-Z_]+,.\\.use=[a-zA-Z_]+,.\\.util=[a-zA-Z_]+,.\\.vector=[a-zA-Z_]+,.\\.version=['\"](§§version§§)['\"],.\\.zrUtil",".\\.throttle=[a-zA-Z_]+,.\\.time=[a-zA-Z_]+,.\\.util=[a-zA-Z_]+,.\\.vector=[a-zA-Z_]+,.\\.version=['\"](§§version§§)['\"],.\\.zrender"],"vulnerabilities":[{"atOrAbove":"0","below":"6.1.0","severity":"medium","ids":["CVE-2026-45249","GHSA-fgmj-fm8m-jvvx"]}]},"ember":{"uri":["/(?:v)?(§§version§§)/ember(\\.min)?\\.js","/ember\\.?js/(§§version§§)/ember((\\.|-)[a-z\\-.]+)?\\.js"],"filename":["ember-(§§version§§)(\\.min)?\\.js"],"filecontent":["Project: Ember -(?:.*\n){9,11}// Version: v(§§version§§)","// Version: v(§§version§§)(.*\n){10,15}(Ember Debug|@module ember|@class ember)","Ember.VERSION[ ]?=[ ]?(?:'|\")(§§version§§)(?:'|\")","meta\\.revision=\"Ember@(§§version§§)\"","e\\(\"ember/version\",\\[\"exports\"\\],function\\(e\\)\\{\"use strict\";?[\\s]*e(?:\\.|\\[\")default(?:\"\\])?=\"(§§version§§)\"","\\(\"ember/version\",\\[\"exports\"\\],function\\(e\\)\\{\"use strict\";.{1,70}\\.default=\"(§§version§§)\"","/\\*![\\s]+\\* @overview Ember - JavaScript Application Framework[\\s\\S]{0,400}\\* @version (§§version§§)","// Version: (§§version§§)[\\s]+\\(function\\(\\) *\\{[\\s]*/\\*\\*[\\s]+@module ember[\\s]","Object\\.defineProperty\\(\\{__proto__:null,CI:!1,DEBUG:!1\\},Symbol\\.toStringTag,\\{value:\"Module\"\\}\\),\\w+=\"(§§version§§)\"","isLowLevelRegister:function\\(e\\)\\{return e<=3\\}\\},Symbol\\.toStringTag,\\{value:\"Module\"\\}\\),\\w+=\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":null,"below":"0.9.7","severity":"high","ids":["Bound attributes aren't escaped properly"]},{"atOrAbove":null,"below":"0.9.7.1","severity":"low","ids":["More rigorous XSS escaping from bindAttr"]},{"atOrAbove":"1.0.0-rc.1","below":"1.0.0-rc.1.1","severity":"medium","ids":["CVE-2013-4170"]},{"atOrAbove":"1.0.0-rc.2","below":"1.0.0-rc.2.1","severity":"medium","ids":["CVE-2013-4170"]},{"atOrAbove":"1.0.0-rc.3","below":"1.0.0-rc.3.1","severity":"medium","ids":["CVE-2013-4170"]},{"atOrAbove":"1.0.0-rc.4","below":"1.0.0-rc.4.1","severity":"medium","ids":["CVE-2013-4170"]},{"atOrAbove":"1.0.0-rc.5","below":"1.0.0-rc.5.1","severity":"medium","ids":["CVE-2013-4170"]},{"atOrAbove":"1.0.0-rc.6","below":"1.0.0-rc.6.1","severity":"medium","ids":["CVE-2013-4170"]},{"atOrAbove":"1.0.0","below":"1.0.1","severity":"low","ids":["CVE-2014-0013","CVE-2014-0014"]},{"atOrAbove":"1.1.0","below":"1.1.3","severity":"low","ids":["CVE-2014-0013","CVE-2014-0014"]},{"atOrAbove":"1.2.0","below":"1.2.1","severity":"low","ids":["CVE-2014-0013","CVE-2014-0014"]},{"atOrAbove":"1.2.0","below":"1.2.2","severity":"low","ids":["CVE-2014-0046"]},{"atOrAbove":"1.3.0","below":"1.3.1","severity":"low","ids":["CVE-2014-0013","CVE-2014-0014"]},{"atOrAbove":"1.3.0","below":"1.3.2","severity":"low","ids":["CVE-2014-0046"]},{"atOrAbove":"1.4.0","below":"1.4.0-beta.2","severity":"low","ids":["CVE-2014-0013","CVE-2014-0014"]},{"atOrAbove":null,"below":"1.5.0","severity":"low","ids":["CVE-2014-0046"]},{"atOrAbove":"1.8.0","below":"1.11.4","severity":"medium","ids":["CVE-2015-7565"]},{"atOrAbove":"1.12.0","below":"1.12.2","severity":"medium","ids":["CVE-2015-7565"]},{"atOrAbove":"1.13.0","below":"1.13.12","severity":"medium","ids":["CVE-2015-7565"]},{"atOrAbove":"2.0.0","below":"2.0.3","severity":"medium","ids":["CVE-2015-7565"]},{"atOrAbove":"2.1.0","below":"2.1.2","severity":"medium","ids":["CVE-2015-7565"]},{"atOrAbove":"2.2.0","below":"2.2.1","severity":"medium","ids":["CVE-2015-7565"]},{"atOrAbove":null,"below":"3.24.7","severity":"high","ids":["Prototype pollution"]},{"atOrAbove":"3.25.0","below":"3.28.10","severity":"high","ids":["Prototype pollution"]},{"atOrAbove":"4.0.0","below":"4.4.4","severity":"high","ids":["Prototype pollution"]},{"atOrAbove":"4.5.0","below":"4.8.1","severity":"high","ids":["Prototype pollution"]},{"atOrAbove":"4.9.0-alpha.1","below":"4.9.0-beta.3","severity":"high","ids":["Prototype pollution"]}]},"flowplayer":{"uri":["flowplayer-(§§version§§)(\\.min)?\\.js"],"filename":["flowplayer-(§§version§§)(\\.min)?\\.js"],"filecontent":[],"vulnerabilities":[{"atOrAbove":null,"below":"5.4.3","severity":"medium","ids":["XSS vulnerability in Flash fallback"]}]},"froala":{"uri":["/froala-editor/(§§version§§)/","/froala-editor@(§§version§§)/"],"filename":[],"filecontent":["/\\*![\\s]+\\* froala_editor v(§§version§§)","VERSION:\"(§§version§§)\",INSTANCES:\\[\\],OPTS_MAPPING:\\{\\}"],"vulnerabilities":[{"atOrAbove":null,"below":"3.2.2","severity":"medium","ids":["Security issue: XSS via pasted content"]},{"atOrAbove":null,"below":"3.2.2","severity":"medium","ids":["XSS Issue In Link Insertion"]},{"atOrAbove":null,"below":"3.2.3","severity":"medium","ids":["CVE-2019-19935","GHSA-h236-g5gh-vq6c"]},{"atOrAbove":null,"below":"3.2.7","severity":"high","ids":["CVE-2021-28114"]},{"atOrAbove":null,"below":"3.2.7","severity":"medium","ids":["CVE-2021-30109","GHSA-cq6w-w5rj-p9x8"]},{"atOrAbove":null,"below":"4.0.11","severity":"medium","ids":["CVE-2020-22864","GHSA-97x5-cc53-cv4v"]},{"atOrAbove":"4.0.1","below":"4.1.4","severity":"medium","ids":["CVE-2023-41592","GHSA-hvpq-7vcc-5hj5"]},{"atOrAbove":"0","below":"4.3.1","severity":"medium","ids":["CVE-2024-51434","GHSA-549p-5c7f-c5p4"]}]},"handlebars":{"uri":["/(§§version§§)/handlebars(\\.min)?\\.js"],"filename":["handlebars(?:js)?-(§§version§§)(.min)?\\.js"],"filecontent":["Handlebars.VERSION = \"(§§version§§)\";","Handlebars=\\{VERSION:(?:'|\")(§§version§§)(?:'|\")","this.Handlebars=\\{\\};[\n\r \t]+\\(function\\([a-z]\\)\\{[a-z].VERSION=(?:'|\")(§§version§§)(?:'|\")","exports.HandlebarsEnvironment=[\\s\\S]{70,120}exports.VERSION=(?:'|\")(§§version§§)(?:'|\")","/\\*+![\\s]+(?:@license)?[\\s]+handlebars v+(§§version§§)","window\\.Handlebars=.,.\\.VERSION=\"(§§version§§)\"",".\\.HandlebarsEnvironment=.;var .=.\\(.\\),.=.\\(.\\),.=\"(§§version§§)\";.\\.VERSION="],"vulnerabilities":[{"atOrAbove":null,"below":"1.0.0.beta.3","severity":"medium","ids":["poorly sanitized input passed to eval()"]},{"atOrAbove":null,"below":"3.0.7","severity":"high","ids":["GHSA-q42p-pg8m-cqh6"]},{"atOrAbove":null,"below":"3.0.8","severity":"high","ids":["GHSA-2cf5-4w76-r9qv"]},{"atOrAbove":null,"below":"3.0.8","severity":"high","ids":["CVE-2019-20920","GHSA-3cqr-58rm-57f8"]},{"atOrAbove":null,"below":"3.0.8","severity":"high","ids":["GHSA-g9r4-xpmj-mj65"]},{"atOrAbove":null,"below":"3.0.8","severity":"high","ids":["GHSA-q2c6-c6pm-g3gh"]},{"atOrAbove":null,"below":"3.0.8","severity":"high","ids":["CVE-2019-19919","GHSA-w457-6q6x-cgp9"]},{"atOrAbove":null,"below":"4.0.0","severity":"medium","ids":["CVE-2015-8861","GHSA-9prh-257w-9277"]},{"atOrAbove":"4.0.0","below":"4.0.13","severity":"high","ids":["A prototype pollution vulnerability in handlebars is exploitable if an attacker "]},{"atOrAbove":"4.0.0","below":"4.0.14","severity":"high","ids":["GHSA-q42p-pg8m-cqh6"]},{"atOrAbove":"4.1.0","below":"4.1.2","severity":"high","ids":["GHSA-q42p-pg8m-cqh6"]},{"atOrAbove":"4.0.0","below":"4.3.0","severity":"high","ids":["CVE-2019-19919","GHSA-w457-6q6x-cgp9"]},{"atOrAbove":"4.0.0","below":"4.4.5","severity":"high","ids":["CVE-2019-20922","GHSA-62gr-4qp9-h98f"]},{"atOrAbove":"4.0.0","below":"4.4.5","severity":"medium","ids":["GHSA-f52g-6jhx-586p"]},{"atOrAbove":"4.0.0","below":"4.5.2","severity":"high","ids":["GHSA-2cf5-4w76-r9qv"]},{"atOrAbove":"4.0.0","below":"4.5.3","severity":"high","ids":["CVE-2019-20920","GHSA-3cqr-58rm-57f8"]},{"atOrAbove":"4.0.0","below":"4.5.3","severity":"high","ids":["GHSA-g9r4-xpmj-mj65"]},{"atOrAbove":"4.0.0","below":"4.5.3","severity":"high","ids":["GHSA-q2c6-c6pm-g3gh"]},{"atOrAbove":null,"below":"4.6.0","severity":"medium","ids":["Denial of service"]},{"atOrAbove":null,"below":"4.7.7","severity":"high","ids":["CVE-2021-23383","GHSA-765h-qjxv-5f44"]},{"atOrAbove":null,"below":"4.7.7","severity":"high","ids":["CVE-2021-23369","GHSA-f2jv-r9rf-7988"]},{"atOrAbove":"4.0.0","below":"4.7.9","severity":"medium","ids":["CVE-2026-33916","GHSA-2qvq-rjwj-gvw9"]},{"atOrAbove":"4.0.0","below":"4.7.9","severity":"critical","ids":["CVE-2026-33937","GHSA-2w6w-674q-4c4q"]},{"atOrAbove":"4.0.0","below":"4.7.9","severity":"high","ids":["CVE-2026-33938","GHSA-3mfm-83xf-c92r"]},{"atOrAbove":"4.0.0","below":"4.7.9","severity":"low","ids":["GHSA-442j-39wm-28r2"]},{"atOrAbove":"4.0.0","below":"4.7.9","severity":"high","ids":["CVE-2026-33939","GHSA-9cx6-37pm-9jff"]},{"atOrAbove":"4.0.0","below":"4.7.9","severity":"high","ids":["CVE-2026-33940","GHSA-xhpv-hc6g-r9c6"]},{"atOrAbove":"4.0.0","below":"4.7.9","severity":"high","ids":["CVE-2026-33941","GHSA-xjpj-3mr7-gcpf"]},{"atOrAbove":"4.6.0","below":"4.7.9","severity":"medium","ids":["GHSA-7rx3-28cr-v5wh"]},{"atOrAbove":"3.0.0","below":"4.7.10","severity":"critical","ids":["CVE-2026-106445","GHSA-p8wg-vrv2-v86f"]},{"atOrAbove":"4.0.0","below":"4.7.10","severity":"critical","ids":["CVE-2026-106446","GHSA-8r5x-fm3f-whwj"]},{"atOrAbove":"4.0.0","below":"4.7.10","severity":"medium","ids":["CVE-2026-106444","GHSA-xw65-4hp5-5hc7"]}]},"highcharts":{"uri":["highcharts/(§§version§§)/highcharts(\\.min)?\\.js"],"filename":[],"filecontent":["product:\"Highcharts\",version:\"(§§version§§)\"","product=\"Highcharts\"[,;].\\.version=\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":null,"below":"6.1.0","severity":"high","ids":["CVE-2018-20801","GHSA-xmc8-cjfr-phx3"]},{"atOrAbove":null,"below":"7.2.2","severity":"high","ids":["GHSA-gr4j-r575-g665"]},{"atOrAbove":"8.0.0","below":"8.1.1","severity":"high","ids":["GHSA-gr4j-r575-g665"]},{"atOrAbove":null,"below":"9.0.0","severity":"high","ids":["CVE-2021-29489","GHSA-8j65-4pcq-xq95"]},{"atOrAbove":"0","below":"11.4.9","severity":"high","ids":["CVE-2026-118251","GHSA-5793-x2q3-c3q7"]},{"atOrAbove":"6.1.0","below":"11.4.9","severity":"high","ids":["CVE-2026-118250","GHSA-rmqc-xvr3-v46c"]},{"atOrAbove":"10.0.0","below":"11.4.9","severity":"high","ids":["CVE-2026-118246","GHSA-35rr-xwfh-x789"]},{"atOrAbove":"10.3.2","below":"11.4.9","severity":"high","ids":["CVE-2026-116796","GHSA-mw4f-gj5x-6xr4"]},{"atOrAbove":"12.0.0","below":"12.6.1","severity":"high","ids":["CVE-2026-118246","GHSA-35rr-xwfh-x789"]},{"atOrAbove":"12.0.0","below":"12.6.1","severity":"high","ids":["CVE-2026-118251","GHSA-5793-x2q3-c3q7"]},{"atOrAbove":"12.0.0","below":"12.6.1","severity":"high","ids":["CVE-2026-118244","GHSA-65hg-cf3f-5m39"]},{"atOrAbove":"12.0.0","below":"12.6.1","severity":"high","ids":["CVE-2026-118250","GHSA-rmqc-xvr3-v46c"]},{"atOrAbove":"12.0.0","below":"12.6.2","severity":"high","ids":["CVE-2026-116796","GHSA-mw4f-gj5x-6xr4"]},{"atOrAbove":"13.0.0","below":"13.1.0","severity":"high","ids":["CVE-2026-118246","GHSA-35rr-xwfh-x789"]},{"atOrAbove":"13.0.0","below":"13.1.0","severity":"high","ids":["CVE-2026-118251","GHSA-5793-x2q3-c3q7"]},{"atOrAbove":"13.0.0","below":"13.1.0","severity":"high","ids":["CVE-2026-118244","GHSA-65hg-cf3f-5m39"]},{"atOrAbove":"13.0.0","below":"13.1.0","severity":"high","ids":["CVE-2026-118249","GHSA-gfvx-2c2g-38wq"]},{"atOrAbove":"13.0.0","below":"13.1.0","severity":"high","ids":["CVE-2026-118250","GHSA-rmqc-xvr3-v46c"]},{"atOrAbove":"13.0.0","below":"13.1.1","severity":"high","ids":["CVE-2026-116796","GHSA-mw4f-gj5x-6xr4"]}]},"highlightjs":{"uri":["/highlight.js[@/](§§version§§)/"],"filename":["highlight[-.](§§version§§)(.min)?.js"],"filecontent":["/\\*!\\s*[Hh]ighlight.js v(§§version§§)","\"after:highlightBlock\"[\\s\\S]{0,170}versionString=['\"](§§version§§)['\"]"],"vulnerabilities":[{"atOrAbove":"0","below":"9.18.2","severity":"medium","ids":["CVE-2020-26237","GHSA-vfrc-7r7c-w9mx"]},{"atOrAbove":"10.0.0","below":"10.1.2","severity":"medium","ids":["CVE-2020-26237","GHSA-vfrc-7r7c-w9mx"]},{"atOrAbove":"9.0.0","below":"10.4.1","severity":"medium","ids":["GHSA-7wwv-vh3v-89cq"]}]},"jPlayer":{"uri":[],"filename":[],"filecontent":["/\\*!?[\n *]+jPlayer Plugin for jQuery (?:.*\n){1,10}[ *]+Version: (§§version§§)","/\\*!? jPlayer (§§version§§) for jQuery"],"vulnerabilities":[{"atOrAbove":null,"below":"2.2.20","severity":"medium","ids":["CVE-2013-1942"]},{"atOrAbove":null,"below":"2.3.0","severity":"medium","ids":["CVE-2013-2022","GHSA-3jcq-cwr7-6332"]},{"atOrAbove":null,"below":"2.3.1","severity":"medium","ids":["CVE-2013-2023"]}]},"jquery":{"uri":["/(§§version§§)/jquery(\\.min)?\\.js"],"filename":["jquery-(§§version§§)(\\.min)?\\.js"],"filecontent":["/\\*!? jQuery v(§§version§§)","\\* jQuery JavaScript Library v(§§version§§)","\\* jQuery (§§version§§) - New Wave Javascript","/\\*![\\s]+\\* jQuery JavaScript Library v(§§version§§)","// \\$Id: jquery.js,v (§§version§§)","/\\*! jQuery v(§§version§§)","[^a-z]f=\"(§§version§§)\",.*[^a-z]jquery:f,","[^a-z]m=\"(§§version§§)\",.*[^a-z]jquery:m,","[^a-z.]jquery:[ ]?\"(§§version§§)\"","\\$\\.documentElement,Q=e.jQuery,Z=e\\.\\$,ee=\\{\\},te=\\[\\],ne=\"(§§version§§)\"","=\"(§§version§§)\",.{50,300}(.)\\.fn=(\\2)\\.prototype=\\{jquery:"],"vulnerabilities":[{"atOrAbove":null,"below":"1.6.3","severity":"medium","ids":["CVE-2011-4969","GHSA-579v-mp3v-rrw5"]},{"atOrAbove":null,"below":"1.9.0b1","severity":"medium","ids":["CVE-2012-6708","GHSA-2pqj-h3vj-pqgw"]},{"atOrAbove":"1.2.1","below":"1.9.0","severity":"medium","ids":["CVE-2020-7656","GHSA-q4m3-2j7h-f7xw"]},{"atOrAbove":"1.4.0","below":"1.12.0","severity":"medium","ids":["CVE-2015-9251","GHSA-rmxg-73gg-4p98"]},{"atOrAbove":"1.8.0","below":"2.2.0","severity":"medium","ids":["parseHTML() executes scripts in event handlers"]},{"atOrAbove":null,"below":"2.999.999","severity":"low","ids":["jQuery 1.x and 2.x are End-of-Life and no longer receiving security updates"]},{"atOrAbove":"1.12.3","below":"3.0.0-beta1","severity":"medium","ids":["CVE-2015-9251","GHSA-rmxg-73gg-4p98"]},{"atOrAbove":"2.2.2","below":"3.0.0","severity":"medium","ids":["parseHTML() executes scripts in event handlers"]},{"atOrAbove":"3.0.0-rc.1","below":"3.0.0","severity":"high","ids":["CVE-2016-10707","GHSA-mhpp-875w-9cpv"]},{"atOrAbove":"1.1.4","below":"3.4.0","severity":"medium","ids":["CVE-2019-11358","GHSA-6c3j-c64m-qhgq"]},{"atOrAbove":"1.0.3","below":"3.5.0","severity":"medium","ids":["CVE-2020-11023","GHSA-jpcq-cgw6-v4j6"]},{"atOrAbove":"1.12.0","below":"3.5.0","severity":"medium","ids":["CVE-2020-11022","GHSA-gxr4-xjj5-5px2"]}]},"jquery-deparam":{"uri":[],"filename":[],"filecontent":[],"vulnerabilities":[{"atOrAbove":null,"below":"0.5.4","severity":"high","ids":["CVE-2021-20087","GHSA-xg68-chx2-253g"]}]},"jquery-migrate":{"uri":[],"filename":["jquery-migrate-(§§version§§)(.min)?\\.js"],"filecontent":["/\\*!?(?:\n \\*)? jQuery Migrate(?: -)? v(§§version§§)","\\.migrateVersion ?= ?\"(§§version§§)\"[\\s\\S]{10,150}(migrateDisablePatches|migrateWarnings|JQMIGRATE)","jQuery\\.migrateVersion ?= ?\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":null,"below":"1.2.0","severity":"medium","ids":["cross-site-scripting"]},{"atOrAbove":null,"below":"1.2.2","severity":"medium","ids":["Selector interpreted as HTML"]}]},"jquery-mobile":{"uri":["/(§§version§§)/jquery.mobile(\\.min)?\\.js"],"filename":["jquery.mobile-(§§version§§)(.min)?\\.js"],"filecontent":["/\\*!?[\\s*]*jQuery Mobile(?: -)? v?(§§version§§)","// Version of the jQuery Mobile Framework[\\s]+version: *[\"'](§§version§§)[\"'],"],"vulnerabilities":[{"atOrAbove":null,"below":"1.0.1","severity":"high","ids":[""]},{"atOrAbove":null,"below":"1.0RC2","severity":"high","ids":[""]},{"atOrAbove":null,"below":"1.1.2","severity":"medium","ids":["location.href cross-site scripting"]},{"atOrAbove":null,"below":"1.2.0","severity":"medium","ids":["location.href cross-site scripting"]},{"atOrAbove":null,"below":"1.3.0","severity":"high","ids":["Endpoint that reflect user input leads to cross site scripting"]},{"atOrAbove":"0","below":"999.999.999","severity":"high","ids":["GHSA-fj93-7wm4-8x2g"]}]},"jquery-ui":{"uri":["/(§§version§§)/jquery-ui(\\.min)?\\.js"],"filename":[],"filecontent":["/\\*!? jQuery UI - v(§§version§§)","/\\*!?[\n *]+jQuery UI (§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"1.13.0","severity":"medium","ids":["CVE-2021-41182","GHSA-9gj3-hwp5-pmwc"]},{"atOrAbove":null,"below":"1.13.0","severity":"medium","ids":["CVE-2021-41184","GHSA-gpqq-952q-5327"]},{"atOrAbove":null,"below":"1.13.0","severity":"medium","ids":["CVE-2021-41183","GHSA-j7qv-pgf6-hvh4"]},{"atOrAbove":null,"below":"1.13.2","severity":"medium","ids":["CVE-2022-31160","GHSA-h6gj-6jjq-h8g9"]}]},"jquery-ui-autocomplete":{"uri":[],"filename":[],"filecontent":["/\\*!? jQuery UI - v(§§version§§)(.*\n){1,3}.*jquery\\.ui\\.autocomplete\\.js","/\\*!?[\n *]+jQuery UI (§§version§§)(.*\n)*.*\\.ui\\.autocomplete","/\\*!?[\n *]+jQuery UI Autocomplete (§§version§§)","/\\*!? jQuery UI - v(§§version§§)(.*\n){1,3}\\* Includes: .* autocomplete\\.js"],"vulnerabilities":[]},"jquery-ui-dialog":{"uri":[],"filename":[],"filecontent":["/\\*!? jQuery UI - v(§§version§§)(.*\n){1,3}.*jquery\\.ui\\.dialog\\.js","/\\*!?[\n *]+jQuery UI (§§version§§)(.*\n)*.*\\.ui\\.dialog","/\\*!?[\n *]+jQuery UI Dialog (§§version§§)","/\\*!? jQuery UI - v(§§version§§)(.*\n){1,3}\\* Includes: .* dialog\\.js"],"vulnerabilities":[{"atOrAbove":"1.7.0","below":"1.10.0","severity":"medium","ids":["CVE-2010-5312","GHSA-wcm2-9c89-wmfm"]},{"atOrAbove":null,"below":"1.12.0","severity":"medium","ids":["CVE-2016-7103","GHSA-hpcf-8vf9-q4gj"]}]},"jquery-ui-tooltip":{"uri":[],"filename":[],"filecontent":["/\\*!? jQuery UI - v(§§version§§)(.*\n){1,3}.*jquery\\.ui\\.tooltip\\.js","/\\*!?[\n *]+jQuery UI (§§version§§)(.*\n)*.*\\.ui\\.tooltip","/\\*!?[\n *]+jQuery UI Tooltip (§§version§§)"],"vulnerabilities":[{"atOrAbove":"1.9.2","below":"1.10.0","severity":"medium","ids":["CVE-2012-6662","GHSA-qqxp-xp9v-vvx6"]}]},"jquery-validation":{"uri":["/(§§version§§)/jquery.validat(ion|e)(\\.min)?\\.js","/jquery-validation@(§§version§§)/dist/.*\\.js"],"filename":["jquery.validat(?:ion|e)-(§§version§§)(.min)?\\.js"],"filecontent":["/\\*!?(?:\n \\*)?[\\s]*jQuery Validation Plugin -? ?v(§§version§§)","Original file: /npm/jquery-validation@(§§version§§)/dist/jquery.validate.js"],"vulnerabilities":[{"atOrAbove":null,"below":"1.19.3","severity":"high","ids":["CVE-2021-21252","GHSA-jxwx-85vp-gvwm"]},{"atOrAbove":null,"below":"1.19.4","severity":"low","ids":["CVE-2021-43306","GHSA-j9m2-h2pv-wvph"]},{"atOrAbove":null,"below":"1.19.5","severity":"high","ids":["CVE-2022-31147","GHSA-ffmh-x56j-9rc3"]},{"atOrAbove":null,"below":"1.20.0","severity":"medium","ids":["Potential XSS via showLabel"]},{"atOrAbove":"0","below":"1.20.0","severity":"medium","ids":["CVE-2025-3573","GHSA-rrj2-ph5q-jxw2"]}]},"jquery.datatables":{"uri":["/(§§version§§)/(js/)?(jquery.)?dataTables(.min)?.js"],"filename":["jquery.dataTables-(§§version§§)(\\.min)?\\.js"],"filecontent":["http://www.datatables.net\n +DataTables (§§version§§)","/\\*! DataTables (§§version§§)",".\\.version=\"(§§version§§)\";[\\s]*.\\.settings=\\[\\];[\\s]*.\\.models=\\{[\\s]*\\};[\\s]*.\\.models.oSearch"],"vulnerabilities":[{"atOrAbove":null,"below":"1.10.10","severity":"high","ids":["CVE-2015-6584"]},{"atOrAbove":null,"below":"1.10.22","severity":"high","ids":["CVE-2020-28458","GHSA-m7j4-fhg6-xf5v"]},{"atOrAbove":null,"below":"1.10.22","severity":"medium","ids":["prototype pollution"]},{"atOrAbove":null,"below":"1.10.23","severity":"high","ids":["prototype pollution"]},{"atOrAbove":null,"below":"1.11.3","severity":"low","ids":["possible XSS"]},{"atOrAbove":null,"below":"1.11.3","severity":"medium","ids":["CVE-2021-23445","GHSA-h73q-5wmj-q8pj"]}]},"jquery.prettyPhoto":{"uri":["/prettyPhoto/(§§version§§)/js/jquery\\.prettyPhoto(\\.min?)\\.js","/prettyphoto@(§§version§§)/js/jquery\\.prettyPhoto\\.js"],"filename":[],"filecontent":["/\\*[\r\n -]+Class: prettyPhoto(?:.*\n){1,3}[ ]*Version: (§§version§§)","\\.prettyPhoto[ ]?=[ ]?\\{version:[ ]?(?:'|\")(§§version§§)(?:'|\")\\}"],"vulnerabilities":[{"atOrAbove":null,"below":"3.1.5","severity":"medium","ids":["CVE-2013-6837"]},{"atOrAbove":null,"below":"3.1.6","severity":"high","ids":[""]}]},"jquery.terminal":{"uri":["/jquery.terminal[@/](§§version§§)/"],"filename":[],"filecontent":["version (§§version§§)[\\s]+\\*[\\s]+\\* This file is part of jQuery Terminal.","\\$\\.terminal=\\{version:\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":null,"below":"1.21.0","severity":"medium","ids":["GHSA-2hwp-g4g7-mwwj"]},{"atOrAbove":null,"below":"2.31.1","severity":"low","ids":["CVE-2021-43862","GHSA-x9r5-jxvq-4387"]}]},"jszip":{"uri":["/jszip[/@](§§version§§)/.*\\.js"],"filename":["jszip-(§§version§§)(\\.min)?\\.js"],"filecontent":["/\\*![\\s]+JSZip v(§§version§§) "],"vulnerabilities":[{"atOrAbove":null,"below":"2.7.0","severity":"medium","ids":["CVE-2021-23413","GHSA-jg8v-48h5-wgxg"]},{"atOrAbove":"3.0.0","below":"3.7.0","severity":"medium","ids":["CVE-2021-23413","GHSA-jg8v-48h5-wgxg"]},{"atOrAbove":null,"below":"3.8.0","severity":"medium","ids":["CVE-2022-48285","GHSA-36fh-84j7-cv5h"]}]},"knockout":{"uri":["/knockout/(§§version§§)/knockout(-[a-z.]+)?\\.js"],"filename":["knockout-(§§version§§)(.min)?\\.js"],"filecontent":["(?:\\*|//) Knockout JavaScript library v(§§version§§)",".version=\"(§§version§§)\",_.b\\(.version.,_.version\\),_.options=\\{deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1\\}"],"vulnerabilities":[{"atOrAbove":null,"below":"3.5.0","severity":"medium","ids":["CVE-2019-14862","GHSA-vcjj-xf2r-mwvc"]}]},"lodash":{"uri":["/(§§version§§)/lodash(\\.min)?\\.js"],"filename":[],"filecontent":["/\\*[\\s*!]+(?:@license)?[\\s*]+(?:Lo-Dash|lodash|Lodash) v?(§§version§§)[\\s\\S]{1,200}Build: `lodash modern -o","/\\*[\\s*!]+(?:@license)?[\\s*]+(?:Lo-Dash|lodash|Lodash) v?(§§version§§) <","/\\*[\\s*!]+(?:@license)?[\\s*]+(?:Lo-Dash|lodash|Lodash) v?(§§version§§) lodash.com/license","=\"(§§version§§)(?<=[0-9]{1,2}\\.[0-9]{1,2}\\.[0-9]{1,2})\"[\\s\\S]{1,300}__lodash_hash_undefined__","/\\*[\\s*]+@license[\\s*]+(?:Lo-Dash|lodhash|Lodash)[\\s\\S]{1,500}var VERSION *= *['\"](§§version§§)['\"]","var VERSION=\"(§§version§§)\";var BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8"],"vulnerabilities":[{"atOrAbove":null,"below":"4.17.5","severity":"medium","ids":["CVE-2018-3721","GHSA-fvqr-27wr-82fm"]},{"atOrAbove":null,"below":"4.17.11","severity":"high","ids":["CVE-2018-16487","GHSA-4xc9-xhrj-v574"]},{"atOrAbove":"4.7.0","below":"4.17.11","severity":"medium","ids":["CVE-2019-1010266","GHSA-x5rq-j2xg-h7qm"]},{"atOrAbove":null,"below":"4.17.12","severity":"high","ids":["CVE-2019-10744","GHSA-jf85-cpcp-j695"]},{"atOrAbove":"3.7.0","below":"4.17.19","severity":"high","ids":["CVE-2020-8203","GHSA-p6mc-m468-83gw"]},{"atOrAbove":null,"below":"4.17.21","severity":"high","ids":["CVE-2021-23337","GHSA-35jh-r3h4-6jhm"]},{"atOrAbove":"4.0.0","below":"4.17.21","severity":"medium","ids":["CVE-2020-28500","GHSA-29mw-wpgm-hmr9"]},{"atOrAbove":"4.0.0","below":"4.17.23","severity":"medium","ids":["CVE-2025-13465","GHSA-xxjr-mmjv-4gpg"]},{"atOrAbove":"4.0.0","below":"4.18.0","severity":"high","ids":["CVE-2026-4800","GHSA-r5fr-rjxr-66jc"]},{"atOrAbove":"4.17.23","below":"4.18.1","severity":"medium","ids":["CVE-2026-2950","GHSA-f23m-r3pf-42rh"]}]},"markdown-it":{"uri":["/markdown-it[/@](§§version§§)/?.*\\.js"],"filename":["markdown-it-(§§version§§)(\\.min)?\\.js"],"filecontent":["/\\*! markdown-it(?:-ins)? (§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"3.0.0","severity":"high","ids":["CVE-2015-10005","GHSA-j5p7-jf4q-742q"]},{"atOrAbove":null,"below":"4.1.0","severity":"medium","ids":["CVE-2015-3295"]},{"atOrAbove":"4.0.0","below":"4.3.1","severity":"medium","ids":["Cross-site Scripting (XSS)"]},{"atOrAbove":null,"below":"10.0.0","severity":"medium","ids":["Regular Expression Denial of Service (ReDoS)"]},{"atOrAbove":null,"below":"12.3.2","severity":"medium","ids":["CVE-2022-21670","GHSA-6vfc-qv3f-vr6c"]},{"atOrAbove":null,"below":"13.0.2","severity":"medium","ids":["Fixed crash/infinite loop caused by linkify inline rule"]},{"atOrAbove":"13.0.0","below":"14.1.1","severity":"medium","ids":["CVE-2026-2327","GHSA-38c4-r59v-3vqw"]},{"atOrAbove":"0","below":"14.2.0","severity":"medium","ids":["CVE-2026-48988","GHSA-6v5v-wf23-fmfq"]},{"atOrAbove":"0","below":"14.3.1","severity":"medium","ids":["GHSA-253c-mchw-3w2r"]},{"atOrAbove":"0","below":"14.3.2","severity":"high","ids":["CVE-2026-111759","GHSA-r7fv-28h4-cvq7"]},{"atOrAbove":"0","below":"14.3.3","severity":"low","ids":["CVE-2026-111766","GHSA-vfgh-jcmw-g37q"]},{"atOrAbove":"14.1.0","below":"14.3.3","severity":"high","ids":["CVE-2026-111758","GHSA-gfr2-rv44-r23c"]},{"atOrAbove":"15.0.0","below":"15.0.1","severity":"medium","ids":["GHSA-253c-mchw-3w2r"]},{"atOrAbove":"15.0.0","below":"15.0.2","severity":"high","ids":["CVE-2026-111759","GHSA-r7fv-28h4-cvq7"]},{"atOrAbove":"15.0.0","below":"15.0.3","severity":"high","ids":["CVE-2026-111758","GHSA-gfr2-rv44-r23c"]},{"atOrAbove":"15.0.0","below":"15.0.3","severity":"low","ids":["CVE-2026-111766","GHSA-vfgh-jcmw-g37q"]}]},"marked":{"uri":["/marked[@/](§§version§§)/"],"filename":["marked[-.](§§version§§)(.min)?.js"],"filecontent":["/[!*\\s/]+[\\s]marked v(§§version§§)"],"vulnerabilities":[{"atOrAbove":"0","below":"0.3.1","severity":"medium","ids":["CVE-2014-3743","GHSA-9cw2-jqp5-7x39"]},{"atOrAbove":"0","below":"0.3.3","severity":"medium","ids":["CVE-2015-1370","GHSA-cfjh-p3g4-3q2f"]},{"atOrAbove":"0","below":"0.3.4","severity":"high","ids":["CVE-2015-8854","GHSA-hjcp-j389-59ff"]},{"atOrAbove":"0","below":"0.3.6","severity":"medium","ids":["CVE-2016-10531","GHSA-vfvf-mqq8-rwqc"]},{"atOrAbove":"0","below":"0.3.7","severity":"medium","ids":["CVE-2017-1000427","GHSA-7px7-7xjx-hxm8"]},{"atOrAbove":"0","below":"0.3.9","severity":"high","ids":["CVE-2017-16114","GHSA-x5pg-88wf-qq4p"]},{"atOrAbove":"0","below":"0.3.17","severity":"medium","ids":["CVE-2018-25110","GHSA-p9wx-2529-fp83"]},{"atOrAbove":"0.3.14","below":"0.6.2","severity":"medium","ids":["GHSA-xf5p-87ch-gxw2"]},{"atOrAbove":"0.4.0","below":"0.7.0","severity":"low","ids":["GHSA-ch52-vgq2-943f"]},{"atOrAbove":"1.1.1","below":"2.0.0","severity":"medium","ids":["CVE-2021-21306","GHSA-4r62-v4vq-hr96"]},{"atOrAbove":"0","below":"4.0.10","severity":"high","ids":["CVE-2022-21681","GHSA-5v2h-r2cx-5xgj"]},{"atOrAbove":"0","below":"4.0.10","severity":"high","ids":["CVE-2022-21680","GHSA-rrrm-qjm4-v8hf"]},{"atOrAbove":"18.0.0","below":"18.0.2","severity":"high","ids":["CVE-2026-41680","GHSA-6v9c-7cg6-27q7"]}]},"mathjax":{"uri":["/mathjax@(§§version§§)/","/mathjax/(§§version§§)/"],"filename":[],"filecontent":["\\.MathJax\\.config\\.startup;{10,100}.\\.VERSION=\"(§§version§§)\"","\\.MathJax=\\{version:\"(§§version§§)\"","MathJax.{0,100}.\\.VERSION=void 0,.\\.VERSION=\"(§§version§§)\"","MathJax\\.version=\"(§§version§§)\";","\\.mathjaxVersion=\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":"0","below":"2.7.4","severity":"medium","ids":["CVE-2018-1999024","GHSA-3c48-6pcv-88rm"]},{"atOrAbove":"0","below":"2.7.10","severity":"high","ids":["CVE-2023-39663","GHSA-v638-q856-grg8"]}]},"moment.js":{"uri":["/moment\\.js/(§§version§§)/moment(.min)?\\.js"],"filename":["moment(?:-|\\.)(§§version§§)(?:-min)?\\.js"],"filecontent":["//!? moment.js(?:[\n\r]+)//!? version : (§§version§§)","/\\* Moment.js +\\| +version : (§§version§§) \\|","\\.version=\"(§§version§§)\".{20,60}\"isBefore\".{20,60}\"isAfter\".{200,500}\\.isMoment=","\\.version=\"(§§version§§)\".{20,300}duration.{2,100}\\.isMoment=","\\.isMoment\\(.{50,400}_isUTC.{50,400}=\"(§§version§§)\"","=\"(§§version§§)\".{300,1000}Years:31536e6.{60,80}\\.isMoment","// Moment.js is freely distributable under the terms of the MIT license.[\\s]+//[\\s]+// Version (§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"2.11.2","severity":"medium","ids":["CVE-2016-4055","GHSA-87vv-r9j6-g5qv"]},{"atOrAbove":null,"below":"2.15.2","severity":"medium","ids":["Regular Expression Denial of Service (ReDoS)"]},{"atOrAbove":null,"below":"2.19.3","severity":"high","ids":["CVE-2017-18214","GHSA-446m-mv8f-q348"]},{"atOrAbove":null,"below":"2.29.2","severity":"high","ids":["CVE-2022-24785","GHSA-8hfj-j24r-96c4"]},{"atOrAbove":"2.18.0","below":"2.29.4","severity":"high","ids":["CVE-2022-31129","GHSA-wc69-rhjr-hc9g"]},{"atOrAbove":"2.29.2","below":"2.31.0","severity":"medium","ids":["CVE-2026-17495","GHSA-4p3w-j4w9-5jqw"]}]},"mootools":{"uri":["/mootools/(§§version§§)/mootools"],"filename":["mootools-(§§version§§)(?:\\.min)?\\.js"],"filecontent":["this\\.MooTools\\s*=\\s*\\{[\\s\\S]{0,30}version:\\s*['\"](§§version§§)['\"]"],"vulnerabilities":[{"atOrAbove":"0","below":"1.5.3","severity":"high","ids":["CVE-2021-32821","GHSA-v63q-hgqc-qvpg"]},{"atOrAbove":"0","below":"1.5.3","severity":"medium","ids":["CVE-2021-23432","GHSA-x6hx-7gh3-3q98"]}]},"mustache.js":{"uri":["/(§§version§§)/mustache(\\.min)?\\.js"],"filename":["mustache(?:js)?-(§§version§§)(.min)?\\.js"],"filecontent":["name:\\s*['\"]mustache.js['\"],\\s*version:\\s*['\"](§§version§§)['\"]","name=\"mustache.js\"[;,].\\.version=\"(§§version§§)\"","[^a-z]mustache.version[ ]?=[ ]?(?:'|\")(§§version§§)(?:'|\")","exports.name[ ]?=[ ]?\"mustache.js\";[\n ]*exports.version[ ]?=[ ]?(?:'|\")(§§version§§)(?:'|\");"],"vulnerabilities":[{"atOrAbove":null,"below":"0.3.1","severity":"high","ids":["execution of arbitrary javascript"]},{"atOrAbove":null,"below":"2.2.1","severity":"high","ids":["CVE-2015-8862","GHSA-w3w8-37jv-2c58"]}]},"nextjs":{"uri":[],"filename":[],"filecontent":["version=\"(§§version§§)\".{1,1500}document\\.getElementById\\(\"__NEXT_DATA__\"\\)\\.textContent","document\\.getElementById\\(\"__NEXT_DATA__\"\\)\\.textContent\\);window\\.__NEXT_DATA__=.;.\\.version=\"(§§version§§)\"","=\"(§§version§§)\"[\\s\\S]{10,100}Component[\\s\\S]{1,10}componentDidCatch[\\s\\S]{10,30}componentDidMount"],"vulnerabilities":[{"atOrAbove":"1.0.0","below":"2.4.1","severity":"high","ids":["CVE-2017-16877","GHSA-3f5c-4qxj-vmpf"]},{"atOrAbove":"1.0.0","below":"4.2.3","severity":"high","ids":["CVE-2018-6184","GHSA-m34x-wgrh-g897"]},{"atOrAbove":"0.9.9","below":"5.1.0","severity":"high","ids":["GHSA-5vj8-3v2h-h38v"]},{"atOrAbove":"7.0.0","below":"7.0.2","severity":"medium","ids":["CVE-2018-18282","GHSA-qw96-mm2g-c8m7"]},{"atOrAbove":"0.9.9","below":"9.3.2","severity":"medium","ids":["CVE-2020-5284","GHSA-fq77-7p7r-83rj"]},{"atOrAbove":"9.5.0","below":"9.5.4","severity":"medium","ids":["CVE-2020-15242","GHSA-x56p-c8cg-q435"]},{"atOrAbove":"0.9.9","below":"11.1.0","severity":"medium","ids":["CVE-2021-37699","GHSA-vxf5-wxwp-m7g9"]},{"atOrAbove":"10.0.0","below":"11.1.1","severity":"high","ids":["CVE-2021-39178","GHSA-9gr3-7897-pp7m"]},{"atOrAbove":"0.9.9","below":"11.1.3","severity":"high","ids":["CVE-2021-43803","GHSA-25mp-g6fv-mqxx"]},{"atOrAbove":"12.0.0","below":"12.0.5","severity":"high","ids":["CVE-2021-43803","GHSA-25mp-g6fv-mqxx"]},{"atOrAbove":"12.0.0","below":"12.0.9","severity":"medium","ids":["CVE-2022-21721","GHSA-wr66-vrwm-5g5x"]},{"atOrAbove":"10.0.0","below":"12.1.0","severity":"medium","ids":["CVE-2022-23646","GHSA-fmvm-x8mv-47mj"]},{"atOrAbove":"12.2.3","below":"12.2.4","severity":"medium","ids":["CVE-2022-36046","GHSA-wff4-fpwg-qqv3"]},{"atOrAbove":"12.0.0","below":"12.3.5","severity":"high","ids":["CVE-2025-29927","GHSA-f82v-jwr5-mffw"]},{"atOrAbove":"12.3.5","below":"12.3.6","severity":"low","ids":["CVE-2025-30218","GHSA-223j-4rm8-mrmf"]},{"atOrAbove":"0.9.9","below":"13.4.20-canary.13","severity":"low","ids":["CVE-2023-46298","GHSA-c59h-r6p8-q9wc"]},{"atOrAbove":"13.3.1","below":"13.5.0","severity":"high","ids":["CVE-2024-39693","GHSA-fq54-2j52-jc42"]},{"atOrAbove":"13.4.0","below":"13.5.1","severity":"high","ids":["CVE-2024-34350","GHSA-77r5-gw3j-2mpf"]},{"atOrAbove":"13.5.1","below":"13.5.7","severity":"high","ids":["CVE-2024-46982","GHSA-gp8f-8m3g-qvj9"]},{"atOrAbove":"13.0.0","below":"13.5.8","severity":"medium","ids":["CVE-2024-56332","GHSA-7m27-7ghc-44w9"]},{"atOrAbove":"13.0.0","below":"13.5.9","severity":"high","ids":["CVE-2025-29927","GHSA-f82v-jwr5-mffw"]},{"atOrAbove":"13.5.9","below":"13.5.10","severity":"low","ids":["CVE-2025-30218","GHSA-223j-4rm8-mrmf"]},{"atOrAbove":"13.4.0","below":"14.1.1","severity":"high","ids":["CVE-2024-34351","GHSA-fr5h-rqp8-mj6g"]},{"atOrAbove":"10.0.0","below":"14.2.7","severity":"medium","ids":["CVE-2024-47831","GHSA-g77x-44xx-532m"]},{"atOrAbove":"14.0.0","below":"14.2.10","severity":"high","ids":["CVE-2024-46982","GHSA-gp8f-8m3g-qvj9"]},{"atOrAbove":"9.5.5","below":"14.2.15","severity":"high","ids":["CVE-2024-51479","GHSA-7gfc-8cq8-jh5f"]},{"atOrAbove":"14.0.0","below":"14.2.21","severity":"medium","ids":["CVE-2024-56332","GHSA-7m27-7ghc-44w9"]},{"atOrAbove":"0.9.9","below":"14.2.24","severity":"low","ids":["CVE-2025-32421","GHSA-qpjv-v59x-3qc4"]},{"atOrAbove":"14.0.0","below":"14.2.25","severity":"high","ids":["CVE-2025-29927","GHSA-f82v-jwr5-mffw"]},{"atOrAbove":"14.2.25","below":"14.2.26","severity":"low","ids":["CVE-2025-30218","GHSA-223j-4rm8-mrmf"]},{"atOrAbove":"13.0","below":"14.2.30","severity":"low","ids":["CVE-2025-48068","GHSA-3h52-269p-cp9r"]},{"atOrAbove":"0.9.9","below":"14.2.31","severity":"medium","ids":["CVE-2025-57752","GHSA-g5qg-72qw-gw5v"]},{"atOrAbove":"0.9.9","below":"14.2.31","severity":"medium","ids":["CVE-2025-55173","GHSA-xv57-4mr9-wg8v"]},{"atOrAbove":"0.9.9","below":"14.2.32","severity":"medium","ids":["CVE-2025-57822","GHSA-4342-x723-ch2f"]},{"atOrAbove":"13.3.0","below":"14.2.34","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"13.3.1-canary.0","below":"14.2.35","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"15.0.0-canary.0","below":"15.0.0-canary.206","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.1-canary.0","below":"15.0.1-canary.4","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.2-canary.0","below":"15.0.2-canary.12","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.3-canary.0","below":"15.0.3-canary.10","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.4-canary.0","below":"15.0.4-canary.53","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"14.3.0-canary.77","below":"15.0.5","severity":"critical","ids":["GHSA-9qr9-h5gf-34mp"]},{"atOrAbove":"15.0.0-canary.0","below":"15.0.6","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"15.0.0-canary.0","below":"15.0.6","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"15.0.6","below":"15.0.7","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"13.0.0","below":"15.0.8","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"15.1.1-canary.0","below":"15.1.1-canary.28","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.0","below":"15.1.2","severity":"medium","ids":["CVE-2024-56332","GHSA-7m27-7ghc-44w9"]},{"atOrAbove":"15.0.0","below":"15.1.6","severity":"low","ids":["CVE-2025-32421","GHSA-qpjv-v59x-3qc4"]},{"atOrAbove":"15.0.4-canary.51","below":"15.1.8","severity":"high","ids":["CVE-2025-49826","GHSA-67rr-84xm-4c7r"]},{"atOrAbove":"15.1.0-canary.0","below":"15.1.9","severity":"critical","ids":["GHSA-9qr9-h5gf-34mp"]},{"atOrAbove":"15.1.1-canary.0","below":"15.1.10","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"15.1.1-canary.0","below":"15.1.10","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"15.1.10","below":"15.1.11","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"15.1.1-canary.0","below":"15.1.12","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"15.2.0-canary.0","below":"15.2.0-canary.78","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.2.1-canary.0","below":"15.2.1-canary.7","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.0","below":"15.2.2","severity":"low","ids":["CVE-2025-48068","GHSA-3h52-269p-cp9r"]},{"atOrAbove":"15.2.2-canary.0","below":"15.2.2-canary.8","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.0","below":"15.2.3","severity":"high","ids":["CVE-2025-29927","GHSA-f82v-jwr5-mffw"]},{"atOrAbove":"15.2.3","below":"15.2.4","severity":"low","ids":["CVE-2025-30218","GHSA-223j-4rm8-mrmf"]},{"atOrAbove":"15.2.0-canary.0","below":"15.2.6","severity":"critical","ids":["GHSA-9qr9-h5gf-34mp"]},{"atOrAbove":"15.2.0-canary.0","below":"15.2.7","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"15.2.0-canary.0","below":"15.2.7","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"15.2.7","below":"15.2.8","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"15.2.0-canary.0","below":"15.2.9","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"15.3.0-canary.0","below":"15.3.0-canary.47","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.3.1-canary.0","below":"15.3.1-canary.16","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.3.0","below":"15.3.3","severity":"low","ids":["CVE-2025-49005","GHSA-r2fc-ccr8-96c4"]},{"atOrAbove":"15.3.0-canary.0","below":"15.3.6","severity":"critical","ids":["GHSA-9qr9-h5gf-34mp"]},{"atOrAbove":"15.3.0-canary.0","below":"15.3.7","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"15.3.0-canary.0","below":"15.3.7","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"15.3.7","below":"15.3.8","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"15.3.0-canary.0","below":"15.3.9","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"15.4.0-canary.0","below":"15.4.0-canary.131","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.4.2-canary.0","below":"15.4.2-canary.57","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.0.0","below":"15.4.5","severity":"medium","ids":["CVE-2025-57752","GHSA-g5qg-72qw-gw5v"]},{"atOrAbove":"15.0.0","below":"15.4.5","severity":"medium","ids":["CVE-2025-55173","GHSA-xv57-4mr9-wg8v"]},{"atOrAbove":"15.0.0-canary.0","below":"15.4.7","severity":"medium","ids":["CVE-2025-57822","GHSA-4342-x723-ch2f"]},{"atOrAbove":"15.4.0-canary.0","below":"15.4.8","severity":"critical","ids":["GHSA-9qr9-h5gf-34mp"]},{"atOrAbove":"15.4.0-canary.0","below":"15.4.9","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"15.4.0-canary.0","below":"15.4.9","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"15.4.9","below":"15.4.10","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"15.4.0-canary.0","below":"15.4.11","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"15.5.1-canary.0","below":"15.5.1-canary.40","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.5.0-canary.0","below":"15.5.7","severity":"critical","ids":["GHSA-9qr9-h5gf-34mp"]},{"atOrAbove":"15.5.1-canary.0","below":"15.5.8","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"15.5.1-canary.0","below":"15.5.8","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"15.5.8","below":"15.5.9","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"10.0.0","below":"15.5.10","severity":"medium","ids":["CVE-2025-59471","GHSA-9g9p-9gw9-jx7f"]},{"atOrAbove":"15.5.1-canary.0","below":"15.5.10","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"9.5.0","below":"15.5.13","severity":"medium","ids":["CVE-2026-29057","GHSA-ggv3-7p47-pfv8"]},{"atOrAbove":"10.0.0","below":"15.5.14","severity":"medium","ids":["CVE-2026-27980","GHSA-3x4c-7xq6-9pq8"]},{"atOrAbove":"13.0.0","below":"15.5.15","severity":"high","ids":["GHSA-q4gf-8mx6-v5v3"]},{"atOrAbove":"10.0.0","below":"15.5.16","severity":"medium","ids":["CVE-2026-44577","GHSA-h64f-5h5j-jqjh"]},{"atOrAbove":"12.2.0","below":"15.5.16","severity":"high","ids":["CVE-2026-44573","GHSA-36qx-fr4f-26g5"]},{"atOrAbove":"12.2.0","below":"15.5.16","severity":"low","ids":["CVE-2026-44572","GHSA-3g8h-86w9-wvmq"]},{"atOrAbove":"13.0.0","below":"15.5.16","severity":"high","ids":["GHSA-8h8q-6873-q5fj"]},{"atOrAbove":"13.0.0","below":"15.5.16","severity":"medium","ids":["CVE-2026-44580","GHSA-gx5p-jg67-6x7h"]},{"atOrAbove":"13.4.0","below":"15.5.16","severity":"medium","ids":["CVE-2026-44581","GHSA-ffhc-5mcf-pf4q"]},{"atOrAbove":"13.4.6","below":"15.5.16","severity":"low","ids":["CVE-2026-44582","GHSA-vfv6-92ff-j949"]},{"atOrAbove":"13.4.13","below":"15.5.16","severity":"high","ids":["CVE-2026-44578","GHSA-c4j6-fc7j-m34r"]},{"atOrAbove":"14.2.0","below":"15.5.16","severity":"medium","ids":["CVE-2026-44576","GHSA-wfc6-r584-vfw7"]},{"atOrAbove":"15.0.0","below":"15.5.16","severity":"high","ids":["CVE-2026-44579","GHSA-mg66-mrh9-m8jx"]},{"atOrAbove":"15.2.0","below":"15.5.16","severity":"high","ids":["CVE-2026-44575","GHSA-267c-6grr-h53f"]},{"atOrAbove":"15.4.0","below":"15.5.16","severity":"high","ids":["CVE-2026-44574","GHSA-492v-c6pp-mqqv"]},{"atOrAbove":"15.2.0","below":"15.5.18","severity":"high","ids":["CVE-2026-45109","GHSA-26hh-7cqf-hhc6"]},{"atOrAbove":"12.0.0","below":"15.5.21","severity":"high","ids":["CVE-2026-64645","GHSA-p9j2-gv94-2wf4"]},{"atOrAbove":"13.0.0","below":"15.5.21","severity":"medium","ids":["CVE-2026-64647","GHSA-4633-3j49-mh5q"]},{"atOrAbove":"13.0.0","below":"15.5.21","severity":"medium","ids":["CVE-2026-64646","GHSA-4c39-4ccg-62r3"]},{"atOrAbove":"13.0.0","below":"15.5.21","severity":"medium","ids":["CVE-2026-64648","GHSA-68g3-v927-f742"]},{"atOrAbove":"13.0.0","below":"15.5.21","severity":"medium","ids":["CVE-2026-64643","GHSA-955p-x3mx-jcvp"]},{"atOrAbove":"13.0.0","below":"15.5.21","severity":"high","ids":["CVE-2026-64641","GHSA-m99w-x7hq-7vfj"]},{"atOrAbove":"14.1.1","below":"15.5.21","severity":"high","ids":["CVE-2026-64649","GHSA-89xv-2m56-2m9x"]},{"atOrAbove":"15.5.0","below":"15.5.21","severity":"medium","ids":["CVE-2026-64644","GHSA-q8wf-6r8g-63ch"]},{"atOrAbove":"10.0.0","below":"15.5.24","severity":"critical","ids":["GHSA-2xp9-vwfh-vxw4"]},{"atOrAbove":"13.4.0","below":"15.5.24","severity":"critical","ids":["CVE-2026-75604","GHSA-p293-qw3h-jr36"]},{"atOrAbove":"15.0.0","below":"15.5.27","severity":"medium","ids":["CVE-2026-94543","GHSA-4jqv-mc3x-m676"]},{"atOrAbove":"15.0.0","below":"15.5.27","severity":"medium","ids":["CVE-2026-94484","GHSA-mcj8-r9mp-w47p"]},{"atOrAbove":"10.0.0","below":"15.5.28","severity":"critical","ids":["GHSA-2464-fhr4-w9xw"]},{"atOrAbove":"13.0.0","below":"15.5.28","severity":"high","ids":["CVE-2026-94482","GHSA-p3m5-59mp-jv5r"]},{"atOrAbove":"15.6.0-canary.0","below":"15.6.0-canary.59","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"15.6.0-canary.0","below":"15.6.0-canary.59","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"15.6.0-canary.59","below":"15.6.0-canary.60","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"15.6.0-canary.0","below":"15.6.0-canary.61","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"15.6.0-canary.0","below":"15.6.0-canary.61","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"16.0.0-canary.0","below":"16.0.7","severity":"critical","ids":["GHSA-9qr9-h5gf-34mp"]},{"atOrAbove":"16.0.0-beta.0","below":"16.0.9","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"16.0.0-beta.0","below":"16.0.9","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"16.0.9","below":"16.0.10","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"16.0.0-beta.0","below":"16.0.11","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"16.1.0-canary.0","below":"16.1.0-canary.17","severity":"high","ids":["GHSA-mwv6-3258-q52c"]},{"atOrAbove":"16.1.0-canary.0","below":"16.1.0-canary.17","severity":"medium","ids":["GHSA-w37m-7fhw-fmv9"]},{"atOrAbove":"16.1.0-canary.17","below":"16.1.0-canary.19","severity":"high","ids":["GHSA-5j59-xgg2-r9c4"]},{"atOrAbove":"15.6.0-canary.0","below":"16.1.5","severity":"medium","ids":["CVE-2025-59471","GHSA-9g9p-9gw9-jx7f"]},{"atOrAbove":"16.0.0-beta.0","below":"16.1.5","severity":"medium","ids":["CVE-2025-59472","GHSA-5f7q-jpqc-wp7h"]},{"atOrAbove":"16.1.0-canary.0","below":"16.1.5","severity":"high","ids":["GHSA-h25m-26qc-wcjf"]},{"atOrAbove":"16.0.0-beta.0","below":"16.1.7","severity":"medium","ids":["CVE-2026-27980","GHSA-3x4c-7xq6-9pq8"]},{"atOrAbove":"16.0.0-beta.0","below":"16.1.7","severity":"medium","ids":["CVE-2026-29057","GHSA-ggv3-7p47-pfv8"]},{"atOrAbove":"16.0.1","below":"16.1.7","severity":"medium","ids":["CVE-2026-27979","GHSA-h27x-g6w4-24gq"]},{"atOrAbove":"16.0.1","below":"16.1.7","severity":"low","ids":["CVE-2026-27977","GHSA-jcc7-9wpm-mj36"]},{"atOrAbove":"16.0.1","below":"16.1.7","severity":"medium","ids":["CVE-2026-27978","GHSA-mq59-m269-xvcx"]},{"atOrAbove":"16.0.0-beta.0","below":"16.2.3","severity":"high","ids":["GHSA-q4gf-8mx6-v5v3"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"high","ids":["CVE-2026-44575","GHSA-267c-6grr-h53f"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"high","ids":["CVE-2026-44573","GHSA-36qx-fr4f-26g5"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"low","ids":["CVE-2026-44572","GHSA-3g8h-86w9-wvmq"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"high","ids":["CVE-2026-44574","GHSA-492v-c6pp-mqqv"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"high","ids":["GHSA-8h8q-6873-q5fj"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"high","ids":["CVE-2026-44578","GHSA-c4j6-fc7j-m34r"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"medium","ids":["CVE-2026-44581","GHSA-ffhc-5mcf-pf4q"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"medium","ids":["CVE-2026-44580","GHSA-gx5p-jg67-6x7h"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"medium","ids":["CVE-2026-44577","GHSA-h64f-5h5j-jqjh"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"high","ids":["CVE-2026-44579","GHSA-mg66-mrh9-m8jx"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"low","ids":["CVE-2026-44582","GHSA-vfv6-92ff-j949"]},{"atOrAbove":"16.0.0","below":"16.2.5","severity":"medium","ids":["CVE-2026-44576","GHSA-wfc6-r584-vfw7"]},{"atOrAbove":"16.0.0","below":"16.2.6","severity":"high","ids":["CVE-2026-45109","GHSA-26hh-7cqf-hhc6"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"medium","ids":["CVE-2026-64647","GHSA-4633-3j49-mh5q"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"medium","ids":["CVE-2026-64646","GHSA-4c39-4ccg-62r3"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"medium","ids":["CVE-2026-64648","GHSA-68g3-v927-f742"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"high","ids":["CVE-2026-64642","GHSA-6gpp-xcg3-4w24"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"high","ids":["CVE-2026-64649","GHSA-89xv-2m56-2m9x"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"medium","ids":["CVE-2026-64643","GHSA-955p-x3mx-jcvp"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"high","ids":["CVE-2026-64641","GHSA-m99w-x7hq-7vfj"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"high","ids":["CVE-2026-64645","GHSA-p9j2-gv94-2wf4"]},{"atOrAbove":"16.0.0","below":"16.2.11","severity":"medium","ids":["CVE-2026-64644","GHSA-q8wf-6r8g-63ch"]},{"atOrAbove":"16.0.0","below":"16.3.3","severity":"critical","ids":["GHSA-2xp9-vwfh-vxw4"]},{"atOrAbove":"16.0.0","below":"16.3.3","severity":"critical","ids":["CVE-2026-75604","GHSA-p293-qw3h-jr36"]},{"atOrAbove":"16.2.0","below":"16.3.6","severity":"critical","ids":["GHSA-vcvr-r3jv-pc5j"]},{"atOrAbove":"16.0.0","below":"16.3.8","severity":"low","ids":["CVE-2026-94486","GHSA-39w2-rjm5-chcv"]},{"atOrAbove":"16.0.0","below":"16.3.8","severity":"medium","ids":["CVE-2026-94543","GHSA-4jqv-mc3x-m676"]},{"atOrAbove":"16.0.0","below":"16.3.8","severity":"high","ids":["CVE-2026-94483","GHSA-cjq9-62q9-8jv4"]},{"atOrAbove":"16.0.0","below":"16.3.8","severity":"medium","ids":["CVE-2026-94485","GHSA-f87g-xv8r-7p7x"]},{"atOrAbove":"16.0.0","below":"16.3.8","severity":"medium","ids":["CVE-2026-94484","GHSA-mcj8-r9mp-w47p"]},{"atOrAbove":"16.3.0","below":"16.3.8","severity":"medium","ids":["CVE-2026-94544","GHSA-3w37-wq28-93x7"]},{"atOrAbove":"16.3.0","below":"16.3.8","severity":"medium","ids":["CVE-2026-103004","GHSA-h694-7cp9-m8p3"]},{"atOrAbove":"16.0.0","below":"16.4.1","severity":"critical","ids":["GHSA-2464-fhr4-w9xw"]},{"atOrAbove":"16.0.0","below":"16.4.1","severity":"critical","ids":["GHSA-673q-mjm6-r5xr"]},{"atOrAbove":"16.0.0","below":"16.4.1","severity":"high","ids":["CVE-2026-94482","GHSA-p3m5-59mp-jv5r"]}]},"pdf.js":{"uri":["/pdf\\.js/(§§version§§)/","/pdfjs-dist@(§§version§§)/"],"filename":[],"filecontent":["(?:const|var) pdfjsVersion = ['\"](§§version§§)['\"];","PDFJS.version ?= ?['\"](§§version§§)['\"]","apiVersion: ?['\"](§§version§§)['\"][\\s\\S]*,data(:[a-zA-Z.]{1,6})?,[\\s\\S]*password(:[a-zA-Z.]{1,10})?,[\\s\\S]*disableAutoFetch(:[a-zA-Z.]{1,22})?,[\\s\\S]*rangeChunkSize","messageHandler\\.sendWithPromise\\(\"GetDocRequest\",\\{docId:[a-zA-Z],apiVersion:\"(§§version§§)\"","const version = ['\"](§§version§§)['\"];\\s*const build ="],"vulnerabilities":[{"atOrAbove":"0","below":"1.10.100","severity":"high","ids":["CVE-2018-5158","GHSA-7jg2-jgv3-fmr4"]},{"atOrAbove":"2.0.0","below":"2.0.550","severity":"high","ids":["CVE-2018-5158","GHSA-7jg2-jgv3-fmr4"]},{"atOrAbove":"0","below":"4.2.67","severity":"high","ids":["CVE-2024-4367","GHSA-wgrm-67xf-hhpq"]},{"atOrAbove":"5.6.83","below":"6.2.108","severity":"high","ids":["CVE-2026-16633","GHSA-hq66-cqwq-w95j"]}]},"pdfobject":{"uri":["/pdfobject@(§§version§§)/","/pdfobject/(§§version§§)/pdfobject(\\.min)?\\.js"],"filename":[],"filecontent":["\\* +PDFObject v(§§version§§)","/*[\\s]+PDFObject v(§§version§§)","let pdfobjectversion = \"(§§version§§)\";","pdfobjectversion:\"(§§version§§)\""],"vulnerabilities":[]},"pendo":{"uri":[],"filename":[],"filecontent":["// Pendo Agent Wrapper\n//[\\s]+Environment:[\\s]+[^\n]+\n// Agent Version:[\\s]+(§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"2.15.18","severity":"medium","ids":["Patched XSS vulnerability around script loading"]}]},"plupload":{"uri":["/(§§version§§)/plupload(\\.min)?\\.js"],"filename":["plupload-(§§version§§)(.min)?\\.js"],"filecontent":["\\* Plupload - multi-runtime File Uploader(?:\r|\n)+ \\* v(§§version§§)","var g=\\{VERSION:\"(§§version§§)\",.*;window.plupload=g\\}"],"vulnerabilities":[{"atOrAbove":null,"below":"1.5.4","severity":"medium","ids":["CVE-2012-2401"]},{"atOrAbove":null,"below":"1.5.5","severity":"medium","ids":["CVE-2013-0237"]},{"atOrAbove":null,"below":"2.1.9","severity":"medium","ids":["CVE-2016-4566"]},{"atOrAbove":null,"below":"2.3.7","severity":"medium","ids":["Fixed security vulnerability by adding die calls to all php files to prevent the"]},{"atOrAbove":null,"below":"2.3.8","severity":"medium","ids":["Fixed a potential security issue with not entity encoding the file names in the "]},{"atOrAbove":null,"below":"2.3.9","severity":"medium","ids":["CVE-2021-23562","GHSA-rp2c-jrgp-cvr8"]},{"atOrAbove":"3.0.0","below":"3.1.3","severity":"medium","ids":["Fixed security vulnerability by adding die calls to all php files to prevent the"]},{"atOrAbove":"3.0.0","below":"3.1.4","severity":"medium","ids":["Fixed a potential security issue with not entity encoding the file names in the "]},{"atOrAbove":"3.0.0","below":"3.1.5","severity":"medium","ids":["Fixed another case of html entities not being encoded that could be exploded by "]}]},"protobufjs":{"uri":["/protobufjs/(§§version§§)/protobuf(?:\\.min)?\\.js"],"filename":["protobuf-(§§version§§)(?:\\.min)?\\.js"],"filecontent":["protobuf\\.js v(§§version§§)"],"vulnerabilities":[{"atOrAbove":"0","below":"5.0.3","severity":"medium","ids":["CVE-2018-3738","GHSA-762f-c2wg-m8c8"]},{"atOrAbove":"6.0.0","below":"6.8.6","severity":"medium","ids":["CVE-2018-3738","GHSA-762f-c2wg-m8c8"]},{"atOrAbove":"6.10.0","below":"6.10.3","severity":"high","ids":["CVE-2022-25878","GHSA-g954-5hwp-pp24"]},{"atOrAbove":"6.11.0","below":"6.11.3","severity":"high","ids":["CVE-2022-25878","GHSA-g954-5hwp-pp24"]},{"atOrAbove":"6.10.0","below":"6.11.4","severity":"critical","ids":["CVE-2023-36665","GHSA-h755-8qp9-cq85"]},{"atOrAbove":"0","below":"6.11.6","severity":"critical","ids":["CVE-2026-41242","GHSA-xq3m-2v4x-88gg"]},{"atOrAbove":"7.0.0","below":"7.2.5","severity":"critical","ids":["CVE-2023-36665","GHSA-h755-8qp9-cq85"]},{"atOrAbove":"7.0.0","below":"7.5.5","severity":"critical","ids":["CVE-2026-41242","GHSA-xq3m-2v4x-88gg"]},{"atOrAbove":"0","below":"7.5.6","severity":"medium","ids":["CVE-2026-44294","GHSA-2pr8-phx7-x9h3"]},{"atOrAbove":"0","below":"7.5.6","severity":"high","ids":["CVE-2026-44293","GHSA-66ff-xgx4-vchm"]},{"atOrAbove":"0","below":"7.5.6","severity":"high","ids":["CVE-2026-44289","GHSA-685m-2w69-288q"]},{"atOrAbove":"0","below":"7.5.6","severity":"high","ids":["CVE-2026-44291","GHSA-75px-5xx7-5xc7"]},{"atOrAbove":"0","below":"7.5.6","severity":"medium","ids":["CVE-2026-44292","GHSA-fx83-v9x8-x52w"]},{"atOrAbove":"0","below":"7.5.6","severity":"high","ids":["CVE-2026-44290","GHSA-jvwf-75h9-cwgg"]},{"atOrAbove":"0","below":"7.5.6","severity":"medium","ids":["CVE-2026-44288","GHSA-q6x5-8v7m-xcrf"]},{"atOrAbove":"0","below":"7.5.8","severity":"medium","ids":["CVE-2026-45740","GHSA-jggg-4jg4-v7c6"]},{"atOrAbove":"0","below":"7.6.1","severity":"high","ids":["CVE-2026-48712","GHSA-wcpc-wj8m-hjx6"]},{"atOrAbove":"0","below":"7.6.3","severity":"medium","ids":["CVE-2026-54269","GHSA-f38q-mgvj-vph7"]},{"atOrAbove":"7.5.0","below":"7.6.5","severity":"medium","ids":["CVE-2026-59877","GHSA-j3f2-48v5-ccww"]},{"atOrAbove":"8.0.0","below":"8.0.1","severity":"critical","ids":["CVE-2026-41242","GHSA-xq3m-2v4x-88gg"]},{"atOrAbove":"8.0.0","below":"8.0.2","severity":"medium","ids":["CVE-2026-44294","GHSA-2pr8-phx7-x9h3"]},{"atOrAbove":"8.0.0","below":"8.0.2","severity":"high","ids":["CVE-2026-44293","GHSA-66ff-xgx4-vchm"]},{"atOrAbove":"8.0.0","below":"8.0.2","severity":"high","ids":["CVE-2026-44289","GHSA-685m-2w69-288q"]},{"atOrAbove":"8.0.0","below":"8.0.2","severity":"high","ids":["CVE-2026-44291","GHSA-75px-5xx7-5xc7"]},{"atOrAbove":"8.0.0","below":"8.0.2","severity":"medium","ids":["CVE-2026-44292","GHSA-fx83-v9x8-x52w"]},{"atOrAbove":"8.0.0","below":"8.0.2","severity":"high","ids":["CVE-2026-44290","GHSA-jvwf-75h9-cwgg"]},{"atOrAbove":"8.0.0","below":"8.0.2","severity":"medium","ids":["CVE-2026-44288","GHSA-q6x5-8v7m-xcrf"]},{"atOrAbove":"8.0.0","below":"8.2.0","severity":"medium","ids":["CVE-2026-45740","GHSA-jggg-4jg4-v7c6"]},{"atOrAbove":"8.0.0","below":"8.4.1","severity":"high","ids":["CVE-2026-48712","GHSA-wcpc-wj8m-hjx6"]},{"atOrAbove":"8.2.0","below":"8.5.0","severity":"medium","ids":["CVE-2026-54270","GHSA-94rc-8x27-4472"]},{"atOrAbove":"8.0.0","below":"8.6.0","severity":"medium","ids":["CVE-2026-54269","GHSA-f38q-mgvj-vph7"]},{"atOrAbove":"8.2.0","below":"8.6.5","severity":"medium","ids":["CVE-2026-59876","GHSA-jfj6-75fj-8934"]},{"atOrAbove":"8.0.0","below":"8.6.6","severity":"medium","ids":["CVE-2026-59877","GHSA-j3f2-48v5-ccww"]}]},"prototypejs":{"uri":["/(§§version§§)/prototype(\\.min)?\\.js"],"filename":["prototype-(§§version§§)(.min)?\\.js"],"filecontent":["Prototype JavaScript framework, version (§§version§§)","Prototype[ ]?=[ ]?\\{[ \r\n\t]*Version:[ ]?(?:'|\")(§§version§§)(?:'|\")"],"vulnerabilities":[{"atOrAbove":null,"below":"1.5.1.2","severity":"high","ids":["CVE-2008-7220"]},{"atOrAbove":"1.6.0","below":"1.6.0.2","severity":"high","ids":["CVE-2008-7220"]},{"atOrAbove":null,"below":"1.7.4","severity":"high","ids":["CVE-2020-27511"]}]},"quill":{"uri":["/(§§version§§)/quill(?:\\.min)?\\.js"],"filename":["quill-(§§version§§)(?:\\.min)?\\.js"],"filecontent":["Quill Editor v(§§version§§)","static version=\"(§§version§§)\";static imports=\\{delta:[^,]{1,20},parchment:"],"vulnerabilities":[{"atOrAbove":"0","below":"1.3.7","severity":"medium","ids":["GHSA-588m-9qg5-35pq"]},{"atOrAbove":"0","below":"1.3.8","severity":"medium","ids":["CVE-2021-3163","GHSA-4943-9vgg-gr5r"]},{"atOrAbove":"2.0.3","below":"2.0.4","severity":"low","ids":["CVE-2025-15056","CVE-2026-120350","GHSA-v3m3-f69x-jf25"]}]},"react":{"uri":[],"filename":[],"filecontent":["/\\*\\*\n +\\* React \\(with addons\\) ?v(§§version§§)","/\\*\\*\n +\\* React v(§§version§§)","/\\*\\* @license React v(§§version§§)[\\s]*\\* react(-jsx-runtime)?\\.","\"\\./ReactReconciler\":[0-9]+,\"\\./Transaction\":[0-9]+,\"fbjs/lib/invariant\":[0-9]+\\}\\],[0-9]+:\\[function\\(require,module,exports\\)\\{\"use strict\";module\\.exports=\"(§§version§§)\"\\}","ReactVersion\\.js[\\*! \\\\/\n\r]{0,100}function\\(e,t\\)\\{\"use strict\";e\\.exports=\"(§§version§§)\"","expected a ReactNode.[\\s\\S]{0,1800}?function\\(e,t\\)\\{\"use strict\";e\\.exports=\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":"0.4.0","below":"0.4.2","severity":"medium","ids":["CVE-2013-7035","GHSA-g53w-52xc-2j85"]},{"atOrAbove":"0.5.0","below":"0.5.2","severity":"medium","ids":["CVE-2013-7035","GHSA-g53w-52xc-2j85"]},{"atOrAbove":"0.0.1","below":"0.14.0","severity":"high","ids":["GHSA-hg79-j56m-fxgv"]},{"atOrAbove":"16.0.0","below":"16.0.1","severity":"medium","ids":["CVE-2018-6341"]},{"atOrAbove":"16.1.0","below":"16.1.2","severity":"medium","ids":["CVE-2018-6341"]},{"atOrAbove":"16.2.0","below":"16.2.1","severity":"medium","ids":["CVE-2018-6341"]},{"atOrAbove":"16.3.0","below":"16.3.3","severity":"medium","ids":["CVE-2018-6341"]},{"atOrAbove":"16.4.0","below":"16.4.2","severity":"medium","ids":["CVE-2018-6341"]}]},"react-dom":{"uri":["/react-dom@(§§version§§)/","/react-dom/(§§version§§)/"],"filename":[],"filecontent":["version:\"(§§version§§)[a-z0-9\\-]*\"[\\s,]*rendererPackageName:\"react-dom\"","/\\*\\* @license React v(§§version§§)[\\s]*\\* react-dom\\.","return[\\s]+ReactSharedInternals.[a-zA-Z].useHostTransitionStatus\\(\\)[;]?[\\s]*\\}[;,][\\s]*exports.version[\\s]*=[\\s]*\"(§§version§§)\""],"vulnerabilities":[{"atOrAbove":"16.0.0","below":"16.0.1","severity":"medium","ids":["CVE-2018-6341","GHSA-mvjj-gqq2-p4hw"]},{"atOrAbove":"16.1.0","below":"16.1.2","severity":"medium","ids":["CVE-2018-6341","GHSA-mvjj-gqq2-p4hw"]},{"atOrAbove":"16.2.0","below":"16.2.1","severity":"medium","ids":["CVE-2018-6341","GHSA-mvjj-gqq2-p4hw"]},{"atOrAbove":"16.3.0","below":"16.3.3","severity":"medium","ids":["CVE-2018-6341","GHSA-mvjj-gqq2-p4hw"]},{"atOrAbove":"16.4.0","below":"16.4.2","severity":"medium","ids":["CVE-2018-6341","GHSA-mvjj-gqq2-p4hw"]}]},"react-is":{"uri":[],"filename":[],"filecontent":["/\\*\\* @license React v(§§version§§)[\\s]*\\* react-is\\."],"vulnerabilities":[]},"scheduler":{"uri":[],"filename":[],"filecontent":["/\\*\\* @license React v(§§version§§)[\\s]*\\* scheduler\\."],"vulnerabilities":[]},"select2":{"uri":["(§§version§§)/(js/)?select2(.min)?\\.js"],"filename":[],"filecontent":["/\\*!(?:[\\s]+\\*)? Select2 (§§version§§)","/\\*[\\s]+Copyright 20[0-9]{2} [I]gor V[a]ynberg[\\s]+Version: (§§version§§)[\\s\\S]{1,5000}(\\.attr\\(\"class\",\"select2-sizer\"|\\.data\\(document, *\"select2-lastpos\"|document\\)\\.data\\(\"select2-lastpos\"|SingleSelect2, *MultiSelect2|window.Select2 *!== *undefined)"],"vulnerabilities":[{"atOrAbove":"0","below":"4.0.6","severity":"medium","ids":["CVE-2016-10744","GHSA-rf66-hmqf-q3fc"]}]},"sessvars":{"uri":[],"filename":["sessvars-(§§version§§)(.min)?\\.js"],"filecontent":["sessvars ver (§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"1.01","severity":"low","ids":["Unsanitized data passed to eval()"]}]},"svelte":{"uri":["/svelte@(§§version§§)/"],"filename":["svelte[@\\-](§§version§§)(.min)?\\.m?js"],"filecontent":["generated by Svelte v\\$\\{['\"](§§version§§)['\"]\\}","generated by Svelte v(§§version§§) \\*/","version: '(§§version§§)' [\\s\\S]{80,200}'SvelteDOMInsert'","VERSION = '(§§version§§)'[\\s\\S]{21,200}parse\\$[0-9][\\s\\S]{10,80}preprocess","var version\\$[0-9] = \"(§§version§§)\";[\\s\\S]{10,30}normalizeOptions\\(options\\)[\\s\\S]{80,200}'SvelteComponent.html'"],"vulnerabilities":[{"atOrAbove":null,"below":"2.9.8","severity":"medium","ids":["XSS"]},{"atOrAbove":null,"below":"3.46.5","severity":"medium","ids":["XSS"]},{"atOrAbove":null,"below":"3.49.0","severity":"medium","ids":["CVE-2022-25875","GHSA-wv8q-r932-8hc7"]},{"atOrAbove":"3.0.0","below":"3.59.2","severity":"high","ids":["GHSA-gw32-9rmw-qwww"]},{"atOrAbove":null,"below":"4.2.19","severity":"medium","ids":["CVE-2024-45047","GHSA-8266-84wp-wv5c"]},{"atOrAbove":"5.46.0","below":"5.46.4","severity":"medium","ids":["CVE-2025-15265","GHSA-6738-r8g5-qwp3"]},{"atOrAbove":"0","below":"5.51.5","severity":"medium","ids":["CVE-2026-27125","GHSA-crpf-4hrx-3jrp"]},{"atOrAbove":"0","below":"5.51.5","severity":"medium","ids":["CVE-2026-27121","GHSA-f7gr-6p89-r883"]},{"atOrAbove":"0","below":"5.51.5","severity":"medium","ids":["CVE-2026-27122","GHSA-m56q-vw4c-c2cp"]},{"atOrAbove":"5.39.3","below":"5.51.5","severity":"medium","ids":["CVE-2026-27119","GHSA-h7h7-mm68-gmrc"]},{"atOrAbove":"0","below":"5.53.5","severity":"medium","ids":["CVE-2026-27901","GHSA-phwv-c562-gvmh"]},{"atOrAbove":"5.53.0","below":"5.53.5","severity":"medium","ids":["CVE-2026-27902","GHSA-qgvg-pr8v-6rr3"]},{"atOrAbove":"0","below":"5.55.7","severity":"medium","ids":["CVE-2026-42599","GHSA-pr6f-5x2q-rwfp"]},{"atOrAbove":"0","below":"5.55.7","severity":"medium","ids":["CVE-2026-42573","GHSA-rcqx-6q8c-2c42"]},{"atOrAbove":"5.46.0","below":"5.55.7","severity":"medium","ids":["GHSA-f3cj-j4f6-wq85"]},{"atOrAbove":"5.51.5","below":"5.55.7","severity":"medium","ids":["CVE-2026-42567","GHSA-9rmh-mm8f-r9h6"]}]},"swfobject":{"uri":[],"filename":["swfobject_(§§version§§)(.min)?\\.js"],"filecontent":["SWFObject v(§§version§§) "],"vulnerabilities":[{"atOrAbove":null,"below":"2.1","severity":"medium","ids":["DOM-based XSS"]}]},"swiper":{"uri":["/[Ss]wiper[@/](§§version§§)/swiper"],"filename":["swiper[-.](§§version§§)(.min)?.js"],"filecontent":["\\* Swiper (§§version§§)"],"vulnerabilities":[{"atOrAbove":"0","below":"6.5.1","severity":"critical","ids":["CVE-2021-23370","GHSA-p3hc-fv2j-rp68"]},{"atOrAbove":"6.5.1","below":"12.1.2","severity":"critical","ids":["CVE-2026-27212","GHSA-hmx5-qpq5-p643"]}]},"tableexport.jquery.plugin":{"uri":["/tableexport.jquery.plugin@(§§version§§)/tableExport.min.js","/TableExport/(§§version§§)/js/tableexport.min.js"],"filename":[],"filecontent":["/\\*[\\s]+tableExport.jquery.plugin[\\s]+Version (§§version§§)","/\\*![\\s]+\\* TableExport.js v(§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"1.25.0","severity":"medium","ids":["CVE-2022-1291","GHSA-j636-crp3-m584"]}]},"threejs":{"uri":["/three.js/(§§version§§)/","/three.js@(§§version§§)/"],"filename":[],"filecontent":[],"vulnerabilities":[{"atOrAbove":"0","below":"0.125.0","severity":"high","ids":["CVE-2020-28496","GHSA-fq6p-x6j3-cmmq"]}]},"tinyMCE":{"uri":["/tinymce/(§§version§§)/tinymce(\\.min)?\\.js"],"filename":[],"filecontent":["// (§§version§§) \\([0-9\\-]+\\)[\n\r]+.{0,1200}l=.tinymce/geom/Rect.","/\\*\\*[\\s]*\\* TinyMCE version (§§version§§)"],"vulnerabilities":[{"atOrAbove":null,"below":"1.4.2","severity":"high","ids":["CVE-2011-4825"]},{"atOrAbove":null,"below":"4.2.0","severity":"medium","ids":["FIXED so script elements gets removed by default to prevent possible XSS issues "]},{"atOrAbove":null,"below":"4.2.4","severity":"medium","ids":["xss issues with media plugin not properly filtering out some script attributes."]},{"atOrAbove":null,"below":"4.7.12","severity":"medium","ids":["FIXED so links with xlink:href attributes are filtered correctly to prevent XSS."]},{"atOrAbove":null,"below":"4.9.7","severity":"high","ids":["CVE-2020-17480","GHSA-27gm-ghr9-4v95"]},{"atOrAbove":null,"below":"4.9.10","severity":"medium","ids":["CVE-2019-1010091","GHSA-c78w-2gw7-gjv3"]},{"atOrAbove":null,"below":"4.9.11","severity":"medium","ids":["CVE-2020-12648","GHSA-vrv8-v4w8-f95h"]},{"atOrAbove":"5.0.0","below":"5.1.4","severity":"high","ids":["CVE-2020-17480","GHSA-27gm-ghr9-4v95"]},{"atOrAbove":null,"below":"5.1.6","severity":"medium","ids":["CDATA parsing and sanitization has been improved to address a cross-site scripti"]},{"atOrAbove":null,"below":"5.2.2","severity":"low","ids":["media embed content not processing safely in some cases."]},{"atOrAbove":"5.0.0","below":"5.2.2","severity":"medium","ids":["CVE-2019-1010091","GHSA-c78w-2gw7-gjv3"]},{"atOrAbove":null,"below":"5.4.0","severity":"low","ids":["content in an iframe element parsing as DOM elements instead of text content."]},{"atOrAbove":"5.0.0","below":"5.4.1","severity":"medium","ids":["CVE-2020-12648","GHSA-vrv8-v4w8-f95h"]},{"atOrAbove":null,"below":"5.6.0","severity":"low","ids":["GHSA-h96f-fc7c-9r55"]},{"atOrAbove":null,"below":"5.6.0","severity":"medium","ids":["CVE-2024-21911","GHSA-w7jx-j77m-wp65"]},{"atOrAbove":null,"below":"5.7.1","severity":"medium","ids":["GHSA-5vm8-hhgr-jcjp"]},{"atOrAbove":null,"below":"5.9.0","severity":"medium","ids":["CVE-2024-21908","GHSA-5h9g-x5rv-25wg"]},{"atOrAbove":null,"below":"5.10.0","severity":"medium","ids":["CVE-2024-21910","GHSA-r8hm-w5f7-wj39"]},{"atOrAbove":null,"below":"5.10.7","severity":"medium","ids":["CVE-2022-23494","GHSA-gg8r-xjwq-4w92"]},{"atOrAbove":null,"below":"5.10.8","severity":"medium","ids":["CVE-2023-45819","GHSA-hgqx-r2hp-jr38"]},{"atOrAbove":null,"below":"5.10.8","severity":"medium","ids":["CVE-2023-45818","GHSA-v65r-p3vv-jjfv"]},{"atOrAbove":"0","below":"5.10.9","severity":"medium","ids":["CVE-2023-48219","GHSA-v626-r774-j7f8"]},{"atOrAbove":"0","below":"5.10.10","severity":"high","ids":["CVE-2026-47759","GHSA-q742-qvgc-gc2f"]},{"atOrAbove":"0","below":"5.10.10","severity":"high","ids":["CVE-2026-47762","GHSA-v98h-vmpc-fpqv"]},{"atOrAbove":"0","below":"5.10.10","severity":"high","ids":["CVE-2026-47761","GHSA-vg35-5wq7-3x7w"]},{"atOrAbove":"0","below":"5.11.0","severity":"medium","ids":["CVE-2024-38356","GHSA-9hcv-j9pv-qmph"]},{"atOrAbove":"0","below":"5.11.0","severity":"medium","ids":["CVE-2024-38357","GHSA-w9jx-4g6g-rp7x"]},{"atOrAbove":"6.0.0","below":"6.3.1","severity":"medium","ids":["CVE-2022-23494","GHSA-gg8r-xjwq-4w92"]},{"atOrAbove":"6.0.0","below":"6.7.1","severity":"medium","ids":["CVE-2023-45819","GHSA-hgqx-r2hp-jr38"]},{"atOrAbove":"6.0.0","below":"6.7.1","severity":"medium","ids":["CVE-2023-45818","GHSA-v65r-p3vv-jjfv"]},{"atOrAbove":"6.0.0","below":"6.7.3","severity":"medium","ids":["CVE-2023-48219","GHSA-v626-r774-j7f8"]},{"atOrAbove":"0","below":"6.8.1","severity":"medium","ids":["CVE-2024-29203","GHSA-438c-3975-5x3f"]},{"atOrAbove":"6.0.0","below":"6.8.4","severity":"medium","ids":["CVE-2024-38356","GHSA-9hcv-j9pv-qmph"]},{"atOrAbove":"6.0.0","below":"6.8.4","severity":"medium","ids":["CVE-2024-38357","GHSA-w9jx-4g6g-rp7x"]},{"atOrAbove":"0","below":"7.0.0","severity":"medium","ids":["CVE-2024-29881","GHSA-5359-pvf2-pw78"]},{"atOrAbove":"6.8.0","below":"7.1.0","severity":"high","ids":["CVE-2026-47760","GHSA-mh5m-5hw4-5c69"]},{"atOrAbove":"7.0.0","below":"7.2.0","severity":"medium","ids":["CVE-2024-38356","GHSA-9hcv-j9pv-qmph"]},{"atOrAbove":"7.0.0","below":"7.2.0","severity":"medium","ids":["CVE-2024-38357","GHSA-w9jx-4g6g-rp7x"]},{"atOrAbove":"6.0.0","below":"7.9.3","severity":"high","ids":["CVE-2026-47759","GHSA-q742-qvgc-gc2f"]},{"atOrAbove":"6.0.0","below":"7.9.3","severity":"high","ids":["CVE-2026-47762","GHSA-v98h-vmpc-fpqv"]},{"atOrAbove":"6.0.0","below":"7.9.3","severity":"high","ids":["CVE-2026-47761","GHSA-vg35-5wq7-3x7w"]},{"atOrAbove":"7.9.3","below":"7.9.4","severity":"high","ids":["CVE-2026-116675","GHSA-mf2p-h6hf-fcwm"]},{"atOrAbove":"8.0.0","below":"8.5.1","severity":"high","ids":["CVE-2026-47759","GHSA-q742-qvgc-gc2f"]},{"atOrAbove":"8.0.0","below":"8.5.1","severity":"high","ids":["CVE-2026-47762","GHSA-v98h-vmpc-fpqv"]},{"atOrAbove":"8.0.0","below":"8.5.1","severity":"high","ids":["CVE-2026-47761","GHSA-vg35-5wq7-3x7w"]},{"atOrAbove":"8.5.1","below":"8.9.3","severity":"high","ids":["CVE-2026-116675","GHSA-mf2p-h6hf-fcwm"]}]},"ua-parser-js":{"uri":["/(§§version§§)/ua-parser(.min)?.js","/ua-parser-js@(§§version§§)/"],"filename":[],"filecontent":["/\\* UAParser.js v(§§version§§)","/\\*[*!](?:@license)?[\\s]+\\* UAParser.js v(§§version§§)","// UAParser.js v(§§version§§)",".\\.VERSION=\"(§§version§§)\",.\\.BROWSER=\\{NAME:.,MAJOR:\"major\",VERSION:.\\},.\\.CPU=\\{ARCHITECTURE:",".\\.VERSION=\"(§§version§§)\",.\\.BROWSER=.\\(\\[[^\\]]{1,20}\\]\\),.\\.CPU=","LIBVERSION=\"(§§version§§)\",EMPTY=\"\",UNKNOWN=\"\\?\",FUNC_TYPE=\"function\",UNDEF_TYPE=\"undefined\"",".=\"(§§version§§)\",.=\"\",.=\"\\?\",.=\"function\",.=\"undefined\",.=\"object\",(.=\"string\",)?.=\"major\",.=\"model\",.=\"name\",.=\"type\",.=\"vendor\""],"vulnerabilities":[{"atOrAbove":"0","below":"0.7.22","severity":"high","ids":["CVE-2020-7733","GHSA-662x-fhqg-9p8v"]},{"atOrAbove":"0","below":"0.7.22","severity":"high","ids":["CVE-2020-7733","GHSA-662x-fhqg-9p8v"]},{"atOrAbove":"0","below":"0.7.23","severity":"high","ids":["CVE-2020-7793","GHSA-394c-5j6w-4xmx"]},{"atOrAbove":"0.7.14","below":"0.7.24","severity":"high","ids":["CVE-2021-27292","GHSA-78cj-fxph-m83p"]},{"atOrAbove":"0.7.29","below":"0.7.30","severity":"high","ids":["CVE-2021-4229","GHSA-pjwm-rvh2-c87w"]},{"atOrAbove":"0.7.30","below":"0.7.33","severity":"high","ids":["CVE-2022-25927","GHSA-fhg7-m89q-25r3"]},{"atOrAbove":"0.8.0","below":"0.8.1","severity":"high","ids":["CVE-2021-4229","GHSA-pjwm-rvh2-c87w"]},{"atOrAbove":"1.0.0","below":"1.0.1","severity":"high","ids":["CVE-2021-4229","GHSA-pjwm-rvh2-c87w"]},{"atOrAbove":"0.8.0","below":"1.0.33","severity":"high","ids":["CVE-2022-25927","GHSA-fhg7-m89q-25r3"]},{"atOrAbove":"2.0.1","below":"2.0.10","severity":"medium","ids":["CVE-2026-48125","GHSA-9h5v-pfqq-x599"]}]},"underscore.js":{"uri":["/underscore\\.js/(§§version§§)/underscore(-min)?\\.js"],"filename":[],"filecontent":["//[\\s]*Underscore.js (§§version§§)","// *Underscore\\.js[\\s\\S]{1,2500}_\\.VERSION *= *['\"](§§version§§)['\"]"],"vulnerabilities":[{"atOrAbove":"1.3.2","below":"1.12.1","severity":"high","ids":["CVE-2021-23358","GHSA-cf4h-3jhx-xvhq"]},{"atOrAbove":"0","below":"1.13.8","severity":"high","ids":["CVE-2026-27601","GHSA-qpx9-hpmf-5gmw"]}]},"video.js":{"uri":["/video\\.js[@/](§§version§§)/"],"filename":["video\\.js[-.](§§version§§)(\\.min)?\\.js"],"filecontent":["\\* Video\\.js (§§version§§)","\\.videojs=[a-zA-Z]\\(\\)\\}\\(this,function\\(\\)\\{var [a-zA-Z]=[\"'](§§version§§)[\"']","[\"']The element or ID supplied is not valid. \\(videojs\\)[\"']\\)[\\s\\S]{100,400}var (?:[a-zA-Z]{1,2},)?[a-zA-Z]{1,2}=[\"'](§§version§§)[\"']"],"vulnerabilities":[{"atOrAbove":"0","below":"7.14.3","severity":"medium","ids":["CVE-2021-23414","GHSA-pp7m-6j83-m7r6"]}]},"vue":{"uri":["/vue@(§§version§§)/dist/vue\\.js","/vue/(§§version§§)/vue\\..*\\.js","/npm/vue@(§§version§§)"],"filename":["vue-(§§version§§)(\\.min)?\\.js"],"filecontent":["/\\*!\\n \\* Vue.js v(§§version§§)","/\\*\\*?!?\\n ?\\* vue v(§§version§§)","Vue.version = '(§§version§§)';","'(§§version§§)'[^\\n]{0,8000}Vue compiler","\\* Original file: /npm/vue@(§§version§§)/dist/vue.(global|common).js","const version[ ]*=[ ]*\"(§§version§§)\";[\\s]*/\\*\\*[\\s]*\\* SSR utils for \\\\@vue/server-renderer","\\.__vue_app__=.{0,8000}?const [a-z]+=\"(§§version§§)\",","let [A-Za-z]+=\"(§§version§§)\",..=\"undefined\"!=typeof window&&window.trustedTypes;if\\(..\\)try\\{.=..\\.createPolicy\\(\"vue\",","isCustomElement.{1,5}?compilerOptions.{0,500}exposeProxy.{0,700}\"(§§version§§)\"","\"(§§version§§)\"[\\s\\S]{0,150}\\.createPolicy\\(\"vue\"","devtoolsFormatters[\\s\\S]{50,180}\"(§§version§§)\"[\\s\\S]{50,180}\\.createElement\\(\"template\"\\)"],"vulnerabilities":[{"atOrAbove":null,"below":"2.4.3","severity":"medium","ids":["possible xss vector"]},{"atOrAbove":null,"below":"2.5.17","severity":"medium","ids":["potential xss in ssr when using v-bind"]},{"atOrAbove":null,"below":"2.6.11","severity":"medium","ids":["Bump vue-server-renderer's dependency of serialize-javascript to 2.1.2"]},{"atOrAbove":"2.0.0-alpha.1","below":"3.0.0-alpha.0","severity":"low","ids":["CVE-2024-9506","GHSA-5j4c-8p2g-v4jx"]}]},"zrender":{"uri":["/zrender[@/](§§version§§)/"],"filename":["zrender[-.](§§version§§)(.min)?.js"],"filecontent":["ssrDataGetter = getter;[\\s]+\\}[\\s]+var version = '(§§version§§)';[\\s]+","painterCtors\\[name\\] = Ctor;[\\s]+\\}[\\s]+var version = '(§§version§§)';[\\s]+",".\\.util=[a-zA-Z_]+,.\\.vector=[a-zA-Z_]+,.\\.version=['\"](§§version§§)['\"],Object"],"vulnerabilities":[{"atOrAbove":"0","below":"4.3.3","severity":"medium","ids":["CVE-2021-39227","GHSA-fhv8-fx5f-7fxf"]},{"atOrAbove":"5.0.0","below":"5.2.1","severity":"medium","ids":["CVE-2021-39227","GHSA-fhv8-fx5f-7fxf"]}]}} diff --git a/crates/devup-access-checker/src/a11y.rs b/crates/devup-access-checker/src/a11y.rs index 58f1365..8f11603 100644 --- a/crates/devup-access-checker/src/a11y.rs +++ b/crates/devup-access-checker/src/a11y.rs @@ -26,7 +26,14 @@ static TABLES: LazyLock = LazyLock::new(|| sel("table")); static TH: LazyLock = LazyLock::new(|| sel("th, [scope]")); static AUTOPLAY: LazyLock = LazyLock::new(|| sel("video[autoplay], audio[autoplay]")); static TABINDEX: LazyLock = LazyLock::new(|| sel("[tabindex]")); -static OBSOLETE: LazyLock = LazyLock::new(|| sel("marquee, blink, font, center")); +/// WHATWG HTML 명세 "Obsolete features" 의 폐기 요소 +static OBSOLETE: LazyLock = LazyLock::new(|| { + sel( + "acronym, applet, basefont, bgsound, big, blink, center, dir, font, frame, frameset, \ + isindex, keygen, listing, marquee, menuitem, multicol, nextid, nobr, noembed, noframes, \ + plaintext, rb, rtc, spacer, strike, tt, xmp", + ) +}); static MAIN: LazyLock = LazyLock::new(|| sel("main, [role=main]")); static NAV: LazyLock = LazyLock::new(|| sel("nav, [role=navigation]")); static HEADER: LazyLock = LazyLock::new(|| sel("header, [role=banner]")); @@ -83,8 +90,13 @@ pub struct A11yFacts { static HEADINGS: LazyLock = LazyLock::new(|| sel("h1, h2, h3, h4, h5, h6")); static IMG_ALT: LazyLock = LazyLock::new(|| sel("img[alt]")); -static ID_REFS: LazyLock = - LazyLock::new(|| sel("label[for], [aria-labelledby], [aria-describedby], [aria-controls]")); +static ID_REFS: LazyLock = LazyLock::new(|| { + sel( + "label[for], [aria-labelledby], [aria-describedby], [aria-controls], [headers], [aria-owns], \ + [aria-activedescendant], [aria-details], [aria-errormessage], [aria-flowto], input[list], [form], \ + [popovertarget], [commandfor], [itemref]", + ) +}); static ARIA_HIDDEN: LazyLock = LazyLock::new(|| sel("[aria-hidden=true]")); static FOCUSABLE: LazyLock = LazyLock::new(|| { sel( @@ -328,6 +340,17 @@ pub fn extract(doc: &Html) -> A11yFacts { "aria-labelledby", "aria-describedby", "aria-controls", + "headers", + "aria-owns", + "aria-activedescendant", + "aria-details", + "aria-errormessage", + "aria-flowto", + "list", + "form", + "popovertarget", + "commandfor", + "itemref", ] { if attr_name == "for" && el.value().name() != "label" { continue; diff --git a/crates/devup-access-checker/src/aria.rs b/crates/devup-access-checker/src/aria.rs new file mode 100644 index 0000000..bf95adc --- /dev/null +++ b/crates/devup-access-checker/src/aria.rs @@ -0,0 +1,1058 @@ +//! ARIA in HTML·IBM Equal Access·HTML_CodeSniffer·WAVE·W3C i18n checker·EN 301 549 와 대조해 추가한 정적 신호. +//! 대조 결과는 `docs/coverage.md` 에 있다. 네트워크 접근 없음. + +use std::collections::HashMap; +use std::sync::LazyLock; + +use regex::Regex; +use scraper::{ElementRef, Html, Selector}; +use url::Url; + +static ALL: LazyLock = LazyLock::new(|| Selector::parse("*").expect("valid selector")); +static BLINK: LazyLock = + LazyLock::new(|| Regex::new(r"(?i)text-decoration(?:-line)?\s*:[^;}]*\bblink\b").unwrap()); +static DIRECTION: LazyLock = + LazyLock::new(|| Regex::new(r"(?i)\bdirection\s*:\s*(?:rtl|ltr)|unicode-bidi\s*:").unwrap()); + +/// 역할을 지정할 수 없는 요소 (ARIA in HTML "No role") +const NO_ROLE: &[&str] = &[ + "base", "col", "colgroup", "head", "link", "map", "meta", "noscript", "param", "script", + "slot", "source", "style", "template", "title", "track", "dd", "label", "legend", "picture", + "datalist", +]; +/// 자기 역할만 허용하는 요소 +const OWN_ROLE: &[(&str, &str)] = &[ + ("main", "main"), + ("meter", "meter"), + ("progress", "progressbar"), + ("optgroup", "group"), + ("option", "option"), + ("textarea", "textbox"), + ("body", "generic"), +]; +/// aria-* 를 쓸 수 없는 요소 +const NO_ARIA: &[&str] = &[ + "base", "col", "colgroup", "head", "html", "link", "map", "meta", "noscript", "param", + "script", "slot", "source", "style", "template", "title", "track", "datalist", +]; +/// aria-hidden 만 쓸 수 있는 요소 +const ONLY_HIDDEN: &[&str] = &["br", "wbr", "picture"]; + +/// 역할에 묶인(전역이 아닌) ARIA 속성 → 허용 역할 (WAI-ARIA 1.2) +const ROLE_ATTRS: &[(&str, &[&str])] = &[ + ( + "aria-checked", + &[ + "checkbox", + "menuitemcheckbox", + "menuitemradio", + "option", + "radio", + "switch", + "treeitem", + ], + ), + ("aria-pressed", &["button"]), + ( + "aria-selected", + &[ + "gridcell", + "option", + "row", + "tab", + "columnheader", + "rowheader", + "treeitem", + ], + ), + ( + "aria-expanded", + &[ + "application", + "button", + "checkbox", + "combobox", + "gridcell", + "link", + "listbox", + "menuitem", + "row", + "rowheader", + "tab", + "treeitem", + "columnheader", + "menuitemcheckbox", + "menuitemradio", + "switch", + ], + ), + ( + "aria-valuenow", + &[ + "meter", + "progressbar", + "scrollbar", + "separator", + "slider", + "spinbutton", + ], + ), + ( + "aria-valuemin", + &[ + "meter", + "progressbar", + "scrollbar", + "separator", + "slider", + "spinbutton", + ], + ), + ( + "aria-valuemax", + &[ + "meter", + "progressbar", + "scrollbar", + "separator", + "slider", + "spinbutton", + ], + ), + ( + "aria-valuetext", + &[ + "meter", + "progressbar", + "scrollbar", + "separator", + "slider", + "spinbutton", + ], + ), + ( + "aria-level", + &["heading", "listitem", "row", "treeitem", "comment"], + ), + ( + "aria-multiselectable", + &["grid", "listbox", "tablist", "tree", "treegrid"], + ), + ( + "aria-required", + &[ + "checkbox", + "combobox", + "gridcell", + "listbox", + "radiogroup", + "spinbutton", + "textbox", + "searchbox", + "tree", + "columnheader", + "rowheader", + "treegrid", + ], + ), + ("aria-autocomplete", &["combobox", "searchbox", "textbox"]), + ("aria-multiline", &["textbox", "searchbox"]), + ("aria-placeholder", &["textbox", "searchbox"]), + ("aria-modal", &["dialog", "alertdialog"]), + ("aria-sort", &["columnheader", "rowheader"]), + ("aria-colcount", &["table", "grid", "treegrid"]), + ("aria-rowcount", &["table", "grid", "treegrid"]), +]; + +/// 자식이 표현용으로만 취급되는 역할 +const PRESENTATIONAL_CHILDREN: &[&str] = &[ + "button", + "checkbox", + "img", + "meter", + "menuitemcheckbox", + "menuitemradio", + "option", + "progressbar", + "radio", + "scrollbar", + "separator", + "slider", + "switch", + "tab", +]; +/// 자식이 표현용인 역할 안에 있으면 의미를 잃는 요소 +const SEMANTIC_CHILDREN: &[&str] = &[ + "h1", "h2", "h3", "h4", "h5", "h6", "ul", "ol", "table", "nav", "main", +]; +const LANDMARKS: &[&str] = &[ + "navigation", + "complementary", + "region", + "form", + "search", + "banner", + "contentinfo", + "main", +]; +const RTL_LANGS: &[&str] = &[ + "ar", "he", "iw", "fa", "ur", "yi", "ps", "sd", "ug", "dv", "ckb", "syr", +]; +const LABELABLE: &[&str] = &[ + "input", "select", "textarea", "button", "meter", "output", "progress", +]; +const DOC_EXTS: &[&str] = &[ + "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "hwp", "hwpx", "odt", "rtf", +]; +const STATEMENT_WORDS: &[&str] = &[ + "accessibility", + "barrierefreiheit", + "accessibilité", + "accesibilidad", + "accessibilità", + "toegankelijkheid", + "웹 접근성", + "웹접근성", + "접근성 정책", + "접근성 안내", + "접근성 성명", +]; + +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct AriaFacts { + pub role_redundant: Vec, + pub role_not_allowed: Vec, + pub aria_on_prohibited: Vec, + pub attr_not_for_role: Vec, + pub attr_conflict: Vec, + pub attr_redundant: Vec, + pub deprecated_attrs: Vec, + pub presentational_children: Vec, + pub presentation_semantic: Vec, + pub duplicate_landmark_names: Vec, + pub unnamed_region_app: usize, + pub activedescendant_unfocusable: usize, + pub combobox_invalid: Vec, + pub tabbable_non_interactive: usize, + pub iframes: usize, + pub iframe_tabindex_negative: usize, + pub labels: usize, + pub empty_labels: usize, + pub label_for_not_control: Vec, + pub placeholder_only: usize, + pub forms_with_text: usize, + pub forms_without_submit: usize, + pub decorative_conflict: usize, + pub alt_redundant_with_text: usize, + pub adjacent_duplicate_links: usize, + pub figures: usize, + pub figures_unlabeled: usize, + pub canvases: usize, + pub canvases_without_fallback: usize, + pub redundant_title: usize, + pub broken_fragment_links: Vec, + /// 끊어진 같은 페이지 링크가 본문 첫 세 링크 안에 있음 (건너뛰기 링크) + pub broken_skip_link: bool, + pub mouse_only_handlers: usize, + pub inline_blink: usize, + pub media: usize, + pub media_without_controls: usize, + pub statement_links: Vec, + pub document_links: Vec<(String, usize)>, + pub xml_lang_issues: Vec, + pub dir_invalid: Vec, + pub any_dir_rtl: bool, + pub html_dir_rtl: bool, + pub inline_direction: usize, + pub bdo_without_dir: usize, + pub bidi_controls: usize, + pub translate_invalid: Vec, + pub ruby_without_rt: usize, + pub content_language_meta: Option, + pub bom_in_content: usize, + pub accessibility_metadata: Vec, +} + +fn push(v: &mut Vec, s: String) { + if v.len() < 20 && !v.contains(&s) { + v.push(s); + } +} + +fn has_attr(el: &ElementRef, a: &str) -> bool { + el.value().attr(a).is_some() +} + +fn attr_lc(el: &ElementRef, a: &str) -> Option { + el.value().attr(a).map(|v| v.trim().to_ascii_lowercase()) +} + +fn text_of(el: &ElementRef) -> String { + el.text() + .collect::>() + .join(" ") + .split_whitespace() + .collect::>() + .join(" ") +} + +fn norm(s: &str) -> String { + s.chars() + .filter(|c| c.is_alphanumeric()) + .flat_map(char::to_lowercase) + .collect() +} + +fn named(el: &ElementRef) -> bool { + ["aria-label", "aria-labelledby", "title"] + .iter() + .any(|a| el.value().attr(a).is_some_and(|v| !v.trim().is_empty())) +} + +fn has_ancestor(el: &ElementRef, names: &[&str]) -> bool { + el.ancestors() + .filter_map(ElementRef::wrap) + .any(|a| names.contains(&a.value().name())) +} + +/// 요소의 암묵 역할 (주요 요소만). +pub fn implicit_role(el: &ElementRef) -> Option<&'static str> { + let name = el.value().name(); + let typ = attr_lc(el, "type").unwrap_or_default(); + Some(match name { + "a" | "area" if has_attr(el, "href") => "link", + "article" => "article", + "aside" => "complementary", + "button" => "button", + "datalist" => "listbox", + "details" => "group", + "dialog" => "dialog", + "fieldset" => "group", + "figure" => "figure", + "footer" if !has_ancestor(el, &["article", "aside", "main", "nav", "section"]) => { + "contentinfo" + } + "form" if named(el) => "form", + "h1" | "h2" | "h3" | "h4" | "h5" | "h6" => "heading", + "header" if !has_ancestor(el, &["article", "aside", "main", "nav", "section"]) => "banner", + "hr" => "separator", + "img" if el.value().attr("alt") == Some("") => "presentation", + "img" => "img", + "input" => match typ.as_str() { + "button" | "image" | "reset" | "submit" => "button", + "checkbox" => "checkbox", + "radio" => "radio", + "range" => "slider", + "number" => "spinbutton", + "search" if !has_attr(el, "list") => "searchbox", + "" | "text" | "email" | "tel" | "url" if !has_attr(el, "list") => "textbox", + "" | "text" | "email" | "tel" | "url" | "search" => "combobox", + _ => return None, + }, + "li" => "listitem", + "main" => "main", + "menu" | "ol" | "ul" => "list", + "meter" => "meter", + "nav" => "navigation", + "option" => "option", + "output" => "status", + "progress" => "progressbar", + "search" => "search", + "section" if named(el) => "region", + "select" + if has_attr(el, "multiple") + || attr_lc(el, "size").is_some_and(|s| s.parse::().is_ok_and(|n| n > 1)) => + { + "listbox" + } + "select" => "combobox", + "table" => "table", + "tbody" | "thead" | "tfoot" => "rowgroup", + "td" => "cell", + "th" => "columnheader", + "textarea" => "textbox", + "tr" => "row", + _ => return None, + }) +} + +fn explicit_role(el: &ElementRef) -> Option { + attr_lc(el, "role").and_then(|r| r.split_whitespace().next().map(str::to_string)) +} + +fn natively_focusable(el: &ElementRef) -> bool { + match el.value().name() { + "a" | "area" => has_attr(el, "href"), + "button" | "select" | "textarea" | "iframe" | "summary" => true, + "input" => attr_lc(el, "type").as_deref() != Some("hidden"), + _ => has_attr(el, "contenteditable"), + } +} + +pub fn extract(doc: &Html, base: &Url) -> AriaFacts { + let mut f = AriaFacts::default(); + let ids: HashMap<&str, ElementRef> = doc + .select(&ALL) + .filter_map(|e| e.value().attr("id").map(|i| (i, e))) + .collect(); + let anchors: Vec<&str> = doc + .select(&ALL) + .filter(|e| e.value().name() == "a") + .filter_map(|e| e.value().attr("name")) + .collect(); + let role_attrs: HashMap<&str, &[&str]> = ROLE_ATTRS.iter().copied().collect(); + let mut landmark_names: Vec<(String, String)> = Vec::new(); + let mut body_links = 0usize; + let mut prev_link: Option<(String, ElementRef)> = None; + + for el in doc.select(&ALL) { + let e = el.value(); + let name = e.name(); + let role = explicit_role(&el); + let implicit = implicit_role(&el); + let effective = role.clone().or_else(|| implicit.map(str::to_string)); + let tag = |s: &str| format!("{name}: {s}"); + + // ===== 역할 ===== + if let Some(r) = &role { + if implicit == Some(r.as_str()) || r == "generic" && name != "body" { + push(&mut f.role_redundant, tag(r)); + } + let own = OWN_ROLE.iter().find(|(n, _)| *n == name).map(|(_, r)| *r); + let hidden_input = name == "input" && attr_lc(&el, "type").as_deref() == Some("hidden"); + if NO_ROLE.contains(&name) || hidden_input || own.is_some_and(|o| o != r) { + push(&mut f.role_not_allowed, tag(r)); + } + if (r == "region" || r == "application") && !named(&el) { + f.unnamed_region_app += 1; + } + if r == "combobox" { + if el + .descendants() + .filter_map(ElementRef::wrap) + .skip(1) + .any(|d| { + explicit_role(&d).as_deref() == Some("textbox") + || d.value().name() == "input" + }) + { + push( + &mut f.combobox_invalid, + "ARIA 1.1 패턴 (combobox 안에 textbox)".into(), + ); + } + if attr_lc(&el, "aria-autocomplete").as_deref() == Some("inline") { + push(&mut f.combobox_invalid, "aria-autocomplete=inline".into()); + } + } + if (r == "presentation" || r == "none") + && matches!(name, "table" | "ul" | "ol" | "dl") + && el + .descendants() + .filter_map(ElementRef::wrap) + .skip(1) + .any(|d| { + matches!( + d.value().name(), + "th" | "caption" + | "thead" + | "tfoot" + | "h1" + | "h2" + | "h3" + | "h4" + | "h5" + | "h6" + ) || has_attr(&d, "scope") + || has_attr(&d, "headers") + }) + { + push(&mut f.presentation_semantic, tag(r)); + } + } + if let Some(r) = &effective { + if PRESENTATIONAL_CHILDREN.contains(&r.as_str()) + && !(name == "img" + || name == "input" + || name == "meter" + || name == "progress" + || name == "hr") + && el + .descendants() + .filter_map(ElementRef::wrap) + .skip(1) + .any(|d| has_attr(&d, "role") || SEMANTIC_CHILDREN.contains(&d.value().name())) + { + push(&mut f.presentational_children, tag(r)); + } + if LANDMARKS.contains(&r.as_str()) && named(&el) { + let label = attr_lc(&el, "aria-label") + .or_else(|| attr_lc(&el, "title")) + .unwrap_or_else(|| { + attr_lc(&el, "aria-labelledby") + .and_then(|id| ids.get(id.as_str()).map(|t| text_of(t).to_lowercase())) + .unwrap_or_default() + }); + landmark_names.push((r.clone(), label)); + } + } + + // ===== aria-* 속성 ===== + let arias: Vec<(&str, &str)> = e.attrs().filter(|(k, _)| k.starts_with("aria-")).collect(); + if !arias.is_empty() { + let hidden_input = name == "input" && attr_lc(&el, "type").as_deref() == Some("hidden"); + if NO_ARIA.contains(&name) + || hidden_input + || (ONLY_HIDDEN.contains(&name) && arias.iter().any(|(k, _)| *k != "aria-hidden")) + { + push(&mut f.aria_on_prohibited, name.to_string()); + } + } + for (k, v) in &arias { + if matches!(*k, "aria-grabbed" | "aria-dropeffect") { + push(&mut f.deprecated_attrs, k.to_string()); + } + if let Some(allowed) = role_attrs.get(k) + && !effective.as_deref().is_some_and(|r| allowed.contains(&r)) + { + push(&mut f.attr_not_for_role, format!("{name}[{k}]")); + } + let v = v.trim().to_ascii_lowercase(); + let conflict = match *k { + "aria-disabled" => has_attr(&el, "disabled") && v == "false", + "aria-readonly" => { + (has_attr(&el, "readonly") && v == "false") + || (has_attr(&el, "contenteditable") && v == "true") + } + "aria-required" => has_attr(&el, "required") && v == "false", + "aria-hidden" => { + attr_lc(&el, "hidden").as_deref() == Some("until-found") && v == "true" + } + "aria-placeholder" => has_attr(&el, "placeholder"), + "aria-valuemax" => { + has_attr(&el, "max") + && el.value().attr("max").map(str::trim) != Some(v.as_str()) + } + "aria-valuemin" => { + has_attr(&el, "min") + && el.value().attr("min").map(str::trim) != Some(v.as_str()) + } + "aria-checked" => { + name == "input" + && matches!(attr_lc(&el, "type").as_deref(), Some("checkbox" | "radio")) + } + "aria-selected" => name == "option", + "aria-multiselectable" => name == "select", + "aria-haspopup" => name == "input" && has_attr(&el, "list"), + _ => false, + }; + if conflict { + push(&mut f.attr_conflict, format!("{name}[{k}]")); + } + let redundant = match *k { + "aria-disabled" => has_attr(&el, "disabled") && v == "true", + "aria-readonly" => has_attr(&el, "readonly") && v == "true", + "aria-required" => has_attr(&el, "required") && v == "true", + "aria-hidden" => { + attr_lc(&el, "hidden").is_some_and(|h| h != "until-found") && v == "true" + } + _ => false, + }; + if redundant { + push(&mut f.attr_redundant, format!("{name}[{k}]")); + } + } + if has_attr(&el, "aria-activedescendant") + && !natively_focusable(&el) + && !has_attr(&el, "tabindex") + { + f.activedescendant_unfocusable += 1; + } + let tabindex = attr_lc(&el, "tabindex").and_then(|t| t.parse::().ok()); + if tabindex.is_some_and(|t| t >= 0) && !natively_focusable(&el) && role.is_none() { + f.tabbable_non_interactive += 1; + } + if name == "iframe" { + f.iframes += 1; + f.iframe_tabindex_negative += usize::from(tabindex.is_some_and(|t| t < 0)); + } + + // ===== 폼 ===== + if name == "label" { + f.labels += 1; + let img_alt = el + .descendants() + .filter_map(ElementRef::wrap) + .filter(|d| d.value().name() == "img") + .any(|d| d.value().attr("alt").is_some_and(|a| !a.trim().is_empty())); + if text_of(&el).is_empty() && !img_alt && !named(&el) { + f.empty_labels += 1; + } + if let Some(target) = el.value().attr("for").and_then(|t| ids.get(t)) { + let tn = target.value().name(); + let hidden = tn == "input" && attr_lc(target, "type").as_deref() == Some("hidden"); + if !LABELABLE.contains(&tn) || hidden { + push(&mut f.label_for_not_control, format!("for → {tn}")); + } + } + } + if matches!(name, "input" | "textarea") + && e.attr("placeholder").is_some_and(|p| !p.trim().is_empty()) + { + let id = e.attr("id"); + let labelled = has_ancestor(&el, &["label"]) + || has_attr(&el, "aria-labelledby") + || id.is_some_and(|id| { + doc.select(&ALL) + .any(|l| l.value().name() == "label" && l.value().attr("for") == Some(id)) + }); + f.placeholder_only += usize::from(!labelled); + } + if name == "form" { + let fields = el.descendants().filter_map(ElementRef::wrap).filter(|d| { + (d.value().name() == "input" + && matches!( + attr_lc(d, "type").as_deref(), + None | Some( + "" | "text" + | "email" + | "search" + | "tel" + | "url" + | "password" + | "number" + ) + )) + || d.value().name() == "textarea" + }); + if fields.count() > 0 { + f.forms_with_text += 1; + let submit = el.descendants().filter_map(ElementRef::wrap).any(|d| { + (d.value().name() == "button" + && matches!(attr_lc(&d, "type").as_deref(), None | Some("submit"))) + || (d.value().name() == "input" + && matches!(attr_lc(&d, "type").as_deref(), Some("submit" | "image"))) + }) || e.attr("id").is_some_and(|id| { + doc.select(&ALL) + .any(|b| b.value().name() == "button" && b.value().attr("form") == Some(id)) + }); + f.forms_without_submit += usize::from(!submit); + } + } + + // ===== 이미지·미디어 ===== + if name == "img" { + let alt = e.attr("alt"); + if (alt == Some("") && named(&el)) + || (matches!(role.as_deref(), Some("presentation" | "none")) + && alt.is_some_and(|a| !a.trim().is_empty())) + { + f.decorative_conflict += 1; + } + if let Some(a) = alt.filter(|a| !a.trim().is_empty()) + && let Some(link) = el + .ancestors() + .filter_map(ElementRef::wrap) + .find(|x| x.value().name() == "a") + && norm(&text_of(&link)) == norm(a) + { + f.alt_redundant_with_text += 1; + } + } + if name == "figure" { + f.figures += 1; + let caption = el + .children() + .filter_map(ElementRef::wrap) + .any(|c| c.value().name() == "figcaption" && !text_of(&c).is_empty()); + f.figures_unlabeled += usize::from(!caption && !named(&el)); + } + if name == "canvas" { + f.canvases += 1; + let fallback = !text_of(&el).is_empty() + || el.children().filter_map(ElementRef::wrap).next().is_some(); + f.canvases_without_fallback += usize::from( + !fallback && !named(&el) && attr_lc(&el, "aria-hidden").as_deref() != Some("true"), + ); + } + if (name == "video" && !has_attr(&el, "muted")) || name == "audio" { + f.media += 1; + f.media_without_controls += usize::from(!has_attr(&el, "controls")); + } + if let Some(title) = e.attr("title").map(norm).filter(|t| !t.is_empty()) + && [ + Some(text_of(&el)), + e.attr("alt").map(str::to_string), + e.attr("aria-label").map(str::to_string), + ] + .into_iter() + .flatten() + .any(|x| norm(&x) == title) + { + f.redundant_title += 1; + } + + // ===== 링크 ===== + if name == "a" + && let Some(href) = e.attr("href").map(str::trim) + { + if has_ancestor(&el, &["body"]) { + body_links += 1; + } + if let Some(frag) = href.strip_prefix('#') + && !frag.is_empty() + && !matches!(frag, "top") + && !frag.starts_with('!') + && !frag.starts_with('/') + { + let target = percent_decode(frag); + if !ids.contains_key(target.as_str()) && !anchors.contains(&target.as_str()) { + push(&mut f.broken_fragment_links, href.to_string()); + f.broken_skip_link |= body_links <= 3; + } + } + let resolved = base.join(href).map(|u| u.to_string()).unwrap_or_default(); + if let Some((prev, prev_el)) = &prev_link + && *prev == resolved + && prev_el + .next_siblings() + .find(|n| !n.value().as_text().is_some_and(|t| t.trim().is_empty())) + .map(|n| n.id()) + == Some(el.id()) + { + f.adjacent_duplicate_links += 1; + } + prev_link = Some((resolved, el)); + } + let has = |a: &str| e.attr(a).is_some(); + if !natively_focusable(&el) + && ((has("onmouseover") && !has("onfocus")) + || (has("onmouseout") && !has("onblur")) + || ((has("onmousedown") || has("onmouseup")) + && !has("onkeydown") + && !has("onkeyup")) + || has("ondblclick") + || has("onmousemove")) + { + f.mouse_only_handlers += 1; + } + if let Some(style) = e.attr("style") { + f.inline_blink += usize::from(BLINK.is_match(style)); + f.inline_direction += usize::from(DIRECTION.is_match(style)); + } + if name == "a" + && let Some(href) = e.attr("href") + { + let label = format!( + "{} {} {}", + text_of(&el), + e.attr("aria-label").unwrap_or_default(), + e.attr("title").unwrap_or_default() + ) + .to_lowercase(); + let path = href.to_ascii_lowercase(); + if STATEMENT_WORDS.iter().any(|w| label.contains(w)) + || [ + "/accessibility", + "/barrierefreiheit", + "/accessibilite", + "/a11y", + ] + .iter() + .any(|p| path.contains(p)) + { + push(&mut f.statement_links, href.trim().to_string()); + } + let file = path.split(['?', '#']).next().unwrap_or_default(); + if let Some((_, ext)) = file.rsplit('/').next().unwrap_or_default().rsplit_once('.') + && DOC_EXTS.contains(&ext) + { + match f.document_links.iter_mut().find(|(x, _)| x == ext) { + Some((_, n)) => *n += 1, + None => f.document_links.push((ext.to_string(), 1)), + } + } + } + + // ===== 국제화 ===== + let lang = e.attr("lang"); + let xml_lang = e.attr("xml:lang"); + match (lang, xml_lang) { + (None, Some(x)) => push( + &mut f.xml_lang_issues, + format!("{name}: xml:lang={x} 만 있음"), + ), + (Some(l), Some(x)) if !l.trim().eq_ignore_ascii_case(x.trim()) => push( + &mut f.xml_lang_issues, + format!("{name}: lang={l} xml:lang={x}"), + ), + _ => {} + } + if let Some(d) = attr_lc(&el, "dir") { + if !matches!(d.as_str(), "ltr" | "rtl" | "auto") { + push(&mut f.dir_invalid, format!("{name}: {d}")); + } + f.any_dir_rtl |= d == "rtl"; + f.html_dir_rtl |= name == "html" && d == "rtl"; + } + if name == "bdo" && !matches!(attr_lc(&el, "dir").as_deref(), Some("ltr" | "rtl")) { + f.bdo_without_dir += 1; + } + if let Some(t) = attr_lc(&el, "translate") + && !matches!(t.as_str(), "" | "yes" | "no") + { + push(&mut f.translate_invalid, t); + } + if name == "ruby" + && !el + .descendants() + .filter_map(ElementRef::wrap) + .any(|d| d.value().name() == "rt") + { + f.ruby_without_rt += 1; + } + if name == "meta" && attr_lc(&el, "http-equiv").as_deref() == Some("content-language") { + f.content_language_meta = e.attr("content").map(str::to_string); + } + if let Some(v) = e.attr("itemprop") + && v.split_whitespace() + .any(|p| p.starts_with("accessibility") || p.starts_with("accessMode")) + { + push(&mut f.accessibility_metadata, v.to_string()); + } + } + // 같은 역할·같은 이름의 랜드마크 + for (i, (r, n)) in landmark_names.iter().enumerate() { + if landmark_names[..i] + .iter() + .any(|(r2, n2)| r2 == r && n2 == n) + { + push(&mut f.duplicate_landmark_names, format!("{r}: {n}")); + } + } + // 본문 텍스트의 양방향 제어 문자·중간 BOM + if let Some(body) = doc + .select(&Selector::parse("body").expect("valid selector")) + .next() + { + for t in body.text() { + f.bidi_controls += t + .chars() + .filter(|c| matches!(*c as u32, 0x202A..=0x202E | 0x2066..=0x2069)) + .count(); + f.bom_in_content += t.matches('\u{feff}').count(); + } + } + f +} + +fn percent_decode(s: &str) -> String { + url::form_urlencoded::parse(format!("x={s}").as_bytes()) + .next() + .map(|(_, v)| v.into_owned()) + .unwrap_or_default() +} + +/// RTL 문자를 쓰는 언어인지 (주 언어 하위 태그 또는 문자 체계 하위 태그 기준). +pub fn is_rtl_lang(lang: &str) -> bool { + let lower = lang.trim().to_ascii_lowercase(); + let mut parts = lower.split(['-', '_']); + let primary = parts.next().unwrap_or_default(); + RTL_LANGS.contains(&primary) + || parts.any(|p| { + matches!( + p, + "arab" | "hebr" | "thaa" | "syrc" | "nkoo" | "adlm" | "rohg" + ) + }) +} + +/// CSS 텍스트의 `text-decoration: blink` 수. +pub fn css_blink(css: &str) -> usize { + BLINK.find_iter(css).count() +} + +#[cfg(test)] +mod tests { + use super::*; + + fn run(html: &str) -> AriaFacts { + extract( + &Html::parse_document(html), + &Url::parse("https://a.com/").unwrap(), + ) + } + + #[test] + fn roles_and_attributes() { + let f = run(r#" +
+
+

+
+
+ + +
+ +

제목

+
h
  • x
+
+메뉴
+
+
+x
+
+l + +
    +"#); + assert!(f.role_redundant.len() >= 10, "{:?}", f.role_redundant); + for s in [ + "button: button", + "nav: navigation", + "div: generic", + "header: banner", + "select: combobox", + "select: listbox", + "img: presentation", + "input: spinbutton", + ] { + assert!( + f.role_redundant.contains(&s.to_string()), + "{s} {:?}", + f.role_redundant + ); + } + assert!(!f.role_redundant.contains(&"body: generic".to_string())); + assert_eq!( + f.role_not_allowed, + ["label: button", "input: button", "main: region"] + ); + assert_eq!(f.aria_on_prohibited, ["meta", "br", "input"]); + assert_eq!( + f.attr_not_for_role, + ["div[aria-checked]", "select[aria-multiselectable]"] + ); + assert_eq!(f.attr_conflict.len(), 9, "{:?}", f.attr_conflict); + assert_eq!(f.attr_redundant.len(), 4, "{:?}", f.attr_redundant); + let mut dep = f.deprecated_attrs.clone(); + dep.sort(); + assert_eq!(dep, ["aria-dropeffect", "aria-grabbed"]); + assert_eq!(f.presentational_children, ["div: button", "button: button"]); + assert_eq!(f.presentation_semantic, ["table: presentation"]); + assert_eq!( + f.duplicate_landmark_names, + ["navigation: 메뉴", "complementary: 메뉴"] + ); + assert_eq!(f.unnamed_region_app, 1); + assert_eq!(f.activedescendant_unfocusable, 1); + assert_eq!(f.combobox_invalid.len(), 2); + assert_eq!(f.tabbable_non_interactive, 1); + } + + #[test] + fn forms_images_links_i18n() { + let f = run( + r##" +본문 바로가기위x한글a +
    + +
    +
    +로고홈 홈 +상품상품 +
    캡션
    +대체 + +링크같음 +
    +깜빡

    r

    b

    +접근성웹 접근성 정책pdfpdf2hwp +

    x

    y

    z

    qrs +

    t

    u

    漢漢한 +

    ‮뒤집힘 중간

    x
    +"##, + ); + assert_eq!(f.broken_fragment_links, ["#main", "#%EB%B3%B8"]); + assert!(f.broken_skip_link); + assert_eq!((f.labels, f.empty_labels), (6, 1)); + assert_eq!(f.label_for_not_control, ["for → div", "for → input"]); + assert_eq!(f.placeholder_only, 1); + assert_eq!((f.forms_with_text, f.forms_without_submit), (3, 1)); + assert_eq!(f.decorative_conflict, 2); + assert_eq!(f.alt_redundant_with_text, 1); + assert_eq!(f.adjacent_duplicate_links, 1); + assert_eq!((f.figures, f.figures_unlabeled), (3, 1)); + assert_eq!((f.canvases, f.canvases_without_fallback), (3, 1)); + assert_eq!((f.media, f.media_without_controls), (3, 2)); + assert_eq!(f.redundant_title, 2); + assert_eq!(f.mouse_only_handlers, 2); + assert_eq!((f.inline_blink, f.inline_direction), (1, 2)); + assert_eq!(f.statement_links, ["/accessibility", "/policy"]); + assert_eq!( + f.document_links, + [("pdf".to_string(), 2), ("hwp".to_string(), 1)] + ); + assert_eq!( + f.xml_lang_issues, + ["p: xml:lang=en 만 있음", "p: lang=en xml:lang=fr"] + ); + assert_eq!(f.dir_invalid, ["p: sideways"]); + assert!(!f.html_dir_rtl && f.any_dir_rtl); + assert_eq!(f.bdo_without_dir, 2); + assert_eq!(f.translate_invalid, ["maybe"]); + assert_eq!(f.ruby_without_rt, 1); + assert_eq!(f.content_language_meta.as_deref(), Some("ko")); + assert_eq!((f.bidi_controls, f.bom_in_content), (1, 1)); + assert_eq!(f.accessibility_metadata, ["accessibilityFeature"]); + let f = run( + r##"abcdx"##, + ); + assert!(f.html_dir_rtl && f.any_dir_rtl && !f.broken_skip_link); + } + + #[test] + fn implicit_roles_and_frames() { + let f = run( + r#"
    +

    +
    "#, + ); + for s in [ + "details: group", + "dialog: dialog", + "fieldset: group", + "hr: separator", + "meter: meter", + "progress: progressbar", + "search: search", + ] { + assert!( + f.role_redundant.contains(&s.to_string()), + "{s} {:?}", + f.role_redundant + ); + } + assert_eq!( + (f.iframes, f.iframe_tabindex_negative, f.mouse_only_handlers), + (2, 1, 1) + ); + } + + #[test] + fn helpers() { + assert!( + is_rtl_lang("ar") + && is_rtl_lang("he-IL") + && is_rtl_lang("ku-Arab") + && !is_rtl_lang("ko") + && !is_rtl_lang("en-US") + ); + assert_eq!( + css_blink("a{text-decoration: underline blink} b{text-decoration-line:blink}"), + 2 + ); + assert_eq!(percent_decode("%EB%B3%B8"), "본"); + } +} diff --git a/crates/devup-access-checker/src/catalog.rs b/crates/devup-access-checker/src/catalog.rs index bfc3e6b..7a1bbb1 100644 --- a/crates/devup-access-checker/src/catalog.rs +++ b/crates/devup-access-checker/src/catalog.rs @@ -46,6 +46,66 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ ("indexing.x_robots_tag", Indexing, "X-Robots-Tag 헤더"), ("indexing.header_noindex", Indexing, "X-Robots-Tag noindex"), ("indexing.meta_refresh", Indexing, "meta refresh 리다이렉트"), + ( + "indexing.snippet_controls", + Indexing, + "스니펫 제한 지시어 (nosnippet·max-snippet 등)", + ), + ( + "indexing.naver_directives", + Indexing, + "네이버 전용 지시어 (nosourceinfo·nosublinks·nosublink)", + ), + ( + "indexing.bingbot_meta", + Indexing, + "Bing 전용 robots 지시 (meta bingbot·X-Robots-Tag bingbot:)", + ), + ( + "indexing.noindex_blocked_by_robots", + Indexing, + "robots.txt 로 막혀 noindex 를 볼 수 없음", + ), + ( + "indexing.robots_unknown_directives", + Indexing, + "알 수 없는 robots 지시어", + ), + ( + "indexing.unavailable_after_passed", + Indexing, + "unavailable_after 날짜 지남", + ), + ( + "indexing.robots_conflicting_directives", + Indexing, + "상충하는 robots 지시어 (index+noindex 등)", + ), + ( + "indexing.data_nosnippet_invalid_element", + Indexing, + "span·div·section 외 요소의 data-nosnippet", + ), + ( + "indexing.applebot_meta", + Indexing, + "Apple 전용 robots 지시 (meta applebot·X-Robots-Tag applebot:)", + ), + ( + "indexing.yandex_meta", + Indexing, + "Yandex 전용 robots 지시 (meta yandex·X-Robots-Tag yandex:)", + ), + ( + "indexing.yandex_noindex_tag", + Indexing, + "Yandex 태그", + ), + ( + "indexing.google_meta", + Indexing, + "meta name=google (notranslate 등)", + ), ("open_graph.title", OpenGraph, "og:title"), ("open_graph.description", OpenGraph, "og:description"), ("open_graph.image", OpenGraph, "og:image"), @@ -116,6 +176,11 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ ("content.h2", Content, "h2 태그"), ("content.img_alt_missing", Content, "alt 누락 이미지"), ("content.body_text", Content, "정적 HTML body 텍스트"), + ( + "content.csr_shell", + Content, + "CSR 셸 추정 (정적 HTML 본문이 거의 없음)", + ), ("content.internal_links", Content, "내부 링크"), ("content.external_links", Content, "외부 링크"), ( @@ -243,9 +308,24 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ "Naver 크롤러 허용 (Yeti)", ), ( - "crawling.robots_allows.daumoa", + "crawling.robots_allows.daum", + Crawling, + "Daum 크롤러 허용 (Daum)", + ), + ( + "crawling.robots_allows.applebot", + Crawling, + "Apple 검색(Siri·Spotlight) 크롤러 허용 (Applebot)", + ), + ( + "crawling.robots_allows.googlebot_image", + Crawling, + "Google 이미지 크롤러 허용 (Googlebot-Image)", + ), + ( + "crawling.robots_allows.yandex", Crawling, - "Daum 크롤러 허용 (Daumoa)", + "Yandex 크롤러 허용 (Yandex)", ), ("geo.llms_txt", Geo, "llms.txt"), ("geo.llms_full_txt", Geo, "llms-full.txt"), @@ -257,7 +337,7 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ ( "geo.tdm_reservation", Geo, - "TDM 예약 (tdmrep.json / 헤더 / 메타)", + "TDM 예약 선언 (tdmrep.json / 헤더 / 메타)", ), ( "geo.robots_allows.gptbot", @@ -329,6 +409,66 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ Geo, "Common Crawl 크롤러 허용 (CCBot)", ), + ( + "geo.robots_allows.google_cloudvertexbot", + Geo, + "Vertex AI 에이전트 크롤러 허용 (Google-CloudVertexBot)", + ), + ( + "geo.robots_allows.googleother", + Geo, + "Google 범용(연구) 크롤러 허용 (GoogleOther)", + ), + ( + "geo.robots_allows.meta_webindexer", + Geo, + "Meta AI 검색 인용 크롤러 허용 (meta-webindexer)", + ), + ( + "geo.robots_allows.oai_adsbot", + Geo, + "ChatGPT 광고 검증 크롤러 허용 (OAI-AdsBot)", + ), + ( + "geo.robots_allows.amzn_searchbot", + Geo, + "Amazon 검색 크롤러 허용 (Amzn-SearchBot)", + ), + ( + "geo.robots_allows.amzn_user", + Geo, + "Amazon 사용자 요청 크롤러 허용 (Amzn-User)", + ), + ( + "geo.robots_allows.mistralai_user", + Geo, + "Mistral 사용자 요청 크롤러 허용 (MistralAI-User)", + ), + ( + "geo.robots_allows.mistralai_index", + Geo, + "Mistral 검색 색인 크롤러 허용 (MistralAI-Index)", + ), + ( + "geo.robots_allows.mistralai_training", + Geo, + "Mistral 학습 크롤러 허용 (MistralAI-Training)", + ), + ( + "geo.robots_allows.duckassistbot", + Geo, + "DuckDuckGo AI 답변 크롤러 허용 (DuckAssistBot)", + ), + ( + "geo.robots_allows.ai2bot", + Geo, + "Ai2 학습 크롤러 허용 (AI2Bot)", + ), + ( + "geo.robots_allows.webzio_extended", + Geo, + "Webz.io AI 학습 데이터 크롤러 허용 (Webzio-extended)", + ), ("geo.ua_access.gptbot", Geo, "AI UA 응답 (gptbot)"), ("geo.ua_access.claudebot", Geo, "AI UA 응답 (claudebot)"), ( @@ -336,6 +476,7 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ Geo, "AI UA 응답 (perplexitybot)", ), + ("geo.ua_access.ccbot", Geo, "AI UA 응답 (ccbot)"), ("geo.meta_noai", Geo, "meta noai / noimageai 지시"), ( "not_found_page.returns_404", @@ -343,6 +484,16 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ "없는 경로에 404 응답", ), ("not_found_page.custom", NotFoundPage, "커스텀 404 페이지"), + ( + "not_found_page.third_party_calls", + NotFoundPage, + "404 페이지의 외부 호출", + ), + ( + "not_found_page.redirects", + NotFoundPage, + "없는 경로가 리다이렉트됨", + ), ("links.favicon", Links, "favicon 접근"), ("links.apple_touch_icon", Links, "apple-touch-icon 접근"), ("links.canonical", Links, "canonical 접근"), @@ -366,8 +517,51 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ ("open_graph.image_height", OpenGraph, "og:image:height"), ("open_graph.image_alt", OpenGraph, "og:image:alt"), ("open_graph.image_file", OpenGraph, "og:image 실제 파일"), + ("open_graph.image_type", OpenGraph, "og:image:type"), + ( + "open_graph.image_secure_url", + OpenGraph, + "og:image:secure_url", + ), + ( + "open_graph.locale_alternate", + OpenGraph, + "og:locale:alternate", + ), + ("open_graph.video", OpenGraph, "og:video"), + ("open_graph.audio", OpenGraph, "og:audio"), + ("open_graph.determiner", OpenGraph, "og:determiner"), + ( + "open_graph.type_unknown", + OpenGraph, + "명세에 없는 og:type 값", + ), + ( + "open_graph.type_properties", + OpenGraph, + "og:type 별 속성 (article:published_time 등)", + ), + ( + "open_graph.image_socialonly", + OpenGraph, + "og:image socialonly (Bing 뉴스)", + ), + ( + "open_graph.image_under_1200", + OpenGraph, + "og:image 가로 1200px 미만 (Discover)", + ), ("twitter.site", Twitter, "twitter:site"), ("twitter.creator", Twitter, "twitter:creator"), + ("twitter.image_alt", Twitter, "twitter:image:alt"), + ("twitter.player", Twitter, "twitter:player"), + ("twitter.app", Twitter, "twitter:app:* (앱 카드)"), + ( + "twitter.card_unknown", + Twitter, + "명세에 없는 twitter:card 값", + ), + ("twitter.domain", Twitter, "twitter:domain"), ( "structured_data.hreflang_x_default", StructuredData, @@ -413,6 +607,121 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ StructuredData, "LocalBusiness 스키마 필수 속성", ), + ( + "structured_data.required.book", + StructuredData, + "Book 스키마 필수 속성", + ), + ( + "structured_data.required.course", + StructuredData, + "Course 스키마 필수 속성", + ), + ( + "structured_data.required.dataset", + StructuredData, + "Dataset 스키마 필수 속성", + ), + ( + "structured_data.required.discussion_forum", + StructuredData, + "DiscussionForumPosting 스키마 필수 속성", + ), + ( + "structured_data.required.education_qa", + StructuredData, + "Quiz 스키마 필수 속성", + ), + ( + "structured_data.required.employer_rating", + StructuredData, + "EmployerAggregateRating 스키마 필수 속성", + ), + ( + "structured_data.required.event", + StructuredData, + "Event 스키마 필수 속성", + ), + ( + "structured_data.required.claim_review", + StructuredData, + "ClaimReview 스키마 필수 속성", + ), + ( + "structured_data.required.image_license", + StructuredData, + "ImageObject 스키마 필수 속성", + ), + ( + "structured_data.required.job_posting", + StructuredData, + "JobPosting 스키마 필수 속성", + ), + ( + "structured_data.required.loyalty_program", + StructuredData, + "MemberProgram 스키마 필수 속성", + ), + ( + "structured_data.required.math_solver", + StructuredData, + "MathSolver 스키마 필수 속성", + ), + ( + "structured_data.required.movie", + StructuredData, + "Movie 스키마 필수 속성", + ), + ( + "structured_data.required.product_group", + StructuredData, + "ProductGroup 스키마 필수 속성", + ), + ( + "structured_data.required.profile_page", + StructuredData, + "ProfilePage 스키마 필수 속성", + ), + ( + "structured_data.required.qa_page", + StructuredData, + "QAPage 스키마 필수 속성", + ), + ( + "structured_data.required.recipe", + StructuredData, + "Recipe 스키마 필수 속성", + ), + ( + "structured_data.required.software_app", + StructuredData, + "SoftwareApplication 스키마 필수 속성", + ), + ( + "structured_data.required.vacation_rental", + StructuredData, + "VacationRental 스키마 필수 속성", + ), + ( + "structured_data.required.video", + StructuredData, + "VideoObject 스키마 필수 속성", + ), + ( + "structured_data.required.item_list", + StructuredData, + "ItemList 스키마 필수 속성", + ), + ( + "structured_data.required.merchant_return_policy", + StructuredData, + "MerchantReturnPolicy 스키마 필수 속성", + ), + ( + "structured_data.required.person", + StructuredData, + "Person 스키마 필수 속성", + ), ("content.heading_skip", Content, "헤딩 레벨 건너뜀"), ("content.internal_nofollow", Content, "내부 링크 nofollow"), ( @@ -420,6 +729,132 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ Content, "내부 링크 표본 중 비정상 응답", ), + ( + "content.uncrawlable_links", + Content, + "검색엔진이 따라갈 수 없는 링크 (href 없음·javascript:)", + ), + ( + "content.plugins", + Content, + "플러그인 콘텐츠 (Flash·Java 등)", + ), + ( + "content.fragment_route_links", + Content, + "해시(#!·#/) 라우트 링크", + ), + ( + "content.pseudo_js_links", + Content, + "의사 자바스크립트 링크 (href=\"fn()\"·href=\"#\"+onclick)", + ), + ( + "content.img_generic_filenames", + Content, + "의미 없는 이미지 파일명 (IMG_1234·숫자·해시)", + ), + ( + "content.parameter_heavy_links", + Content, + "파라미터가 많은 내부 링크 (3개 이상)", + ), + ( + "content.button_type_missing", + Content, + "폼 안의 type 없는 button (submit 으로 동작)", + ), + ( + "content.img_missing_src", + Content, + "src 없는 이미지 (data-src 만·picture 에 img 없음)", + ), + ( + "content.img_unsupported_format", + Content, + "Google 이미지 미지원 형식", + ), + ( + "content.hidden_text_styles", + Content, + "인라인 CSS 로 숨긴 텍스트·링크", + ), + ( + "content.unencoded_link_urls", + Content, + "퍼센트 인코딩 안 된 링크 URL (공백·비ASCII)", + ), + ( + "content.outbound_link_qualifiers", + Content, + "외부 링크 rel (sponsored·ugc·nofollow)", + ), + ( + "content.underscore_url_paths", + Content, + "밑줄로 단어를 구분한 URL", + ), + ( + "content.linked_documents", + Content, + "비HTML 문서 링크 (PDF·HWP·Office)", + ), + ( + "content.bidi_control_chars", + Content, + "본문의 양방향 제어 문자", + ), + ( + "content.invalid_urls", + Content, + "형식이 잘못된 URL (공백·역슬래시·잘못된 % 인코딩)", + ), + ( + "content.invalid_enum_attrs", + Content, + "명세에 없는 열거형 속성 값", + ), + ( + "content.time_datetime_invalid", + Content, + "형식이 잘못된 time datetime", + ), + ( + "content.unknown_elements", + Content, + "HTML 에 없는 요소 (사용자 정의 요소 제외)", + ), + ( + "content.text_not_nfc", + Content, + "NFC 로 정규화되지 않은 텍스트", + ), + ( + "content.section_without_heading", + Content, + "제목 없는 section·article", + ), + ( + "content.input_type_generic", + Content, + "이메일·전화 등에 type=text", + ), + ("content.form_method_missing", Content, "method 없는 form"), + ( + "content.ad_blocker_class_names", + Content, + "광고 차단기에 가려지는 id·class", + ), + ( + "content.attr_unsafe_chars", + Content, + "보이지 않는 제어 문자가 든 속성 값", + ), + ( + "content.broken_resources", + Content, + "깨진 하위 리소스 (JS·CSS)", + ), ( "performance.render_blocking_scripts", Performance, @@ -554,7 +989,7 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ ( "accessibility.obsolete_elements", Accessibility, - "폐기된 표현 요소 (marquee·blink·font·center)", + "폐기된 HTML 요소 (marquee·font·center 등)", ), ( "accessibility.new_window_links", @@ -603,103 +1038,1342 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ Accessibility, "초점 표시 제거 (outline: none)", ), - ("trust.privacy_policy", Trust, "개인정보처리방침 링크"), - ("trust.terms", Trust, "이용약관 링크"), - ("trust.phone", Trust, "전화번호 링크 (tel:)"), - ("trust.email", Trust, "이메일 링크 (mailto:)"), ( - "trust.address", - Trust, - "주소 (
    또는 스키마 address)", + "accessibility.invalid_aria_role", + Accessibility, + "ARIA 명세에 없는 role", ), - ("trust.social_links", Trust, "SNS 링크"), - ("trust.business_number", Trust, "사업자등록번호 표기"), - ("trust.copyright_year", Trust, "저작권 연도 표기"), - ("meta.bing_site_verification", Meta, "Bing 웹마스터 인증"), - ("meta.amphtml", Meta, "AMP 링크 (rel=amphtml)"), ( - "meta.app_link_meta", + "accessibility.invalid_aria_attr", + Accessibility, + "ARIA 명세에 없는 aria-* 속성", + ), + ( + "accessibility.role_img_unnamed", + Accessibility, + "이름 없는 role=\"img\"", + ), + ( + "accessibility.video_captions_missing", + Accessibility, + "자막 트랙 없는 video", + ), + ( + "accessibility.area_alt_missing", + Accessibility, + "alt 없는 이미지맵 area", + ), + ( + "accessibility.object_alt_missing", + Accessibility, + "대체 텍스트 없는 object/embed", + ), + ( + "accessibility.element_lang_invalid", + Accessibility, + "본문 요소의 잘못된 lang 값", + ), + ( + "accessibility.nested_interactive", + Accessibility, + "링크·버튼 안의 인터랙티브 요소", + ), + ( + "accessibility.list_structure_invalid", + Accessibility, + "잘못된 목록 구조 (ul/ol 밖 li 등)", + ), + ( + "accessibility.aria_hidden_root", + Accessibility, + "html/body 에 aria-hidden=\"true\"", + ), + ( + "accessibility.timed_refresh", + Accessibility, + "시간 제한 자동 새로고침 (meta refresh 지연)", + ), + ( + "accessibility.duplicate_accesskeys", + Accessibility, + "중복 accesskey", + ), + ( + "accessibility.presentation_focusable", + Accessibility, + "초점을 받는 요소의 role=presentation/none", + ), + ( + "accessibility.custom_control_unfocusable", + Accessibility, + "초점을 받을 수 없는 커스텀 컨트롤 (role=button 등에 tabindex 없음)", + ), + ( + "accessibility.custom_control_unnamed", + Accessibility, + "이름 없는 커스텀 컨트롤", + ), + ( + "accessibility.click_without_keyboard", + Accessibility, + "키보드로 쓸 수 없는 onclick 요소 (div·span 등)", + ), + ( + "accessibility.aria_required_attr_missing", + Accessibility, + "역할에 필요한 ARIA 속성 누락", + ), + ( + "accessibility.dialog_unnamed", + Accessibility, + "이름 없는 대화상자 (dialog)", + ), + ( + "accessibility.fieldset_legend_missing", + Accessibility, + "legend 없는 fieldset", + ), + ( + "accessibility.radio_group_ungrouped", + Accessibility, + "fieldset·radiogroup 으로 묶이지 않은 라디오 그룹", + ), + ( + "accessibility.autocomplete_invalid", + Accessibility, + "잘못된 autocomplete 값", + ), + ( + "accessibility.empty_table_headers", + Accessibility, + "비어 있는 표 제목 셀 (th)", + ), + ( + "accessibility.scope_invalid", + Accessibility, + "잘못된 scope 속성", + ), + ( + "accessibility.multiple_main", + Accessibility, + "main 랜드마크 중복", + ), + ( + "accessibility.unnamed_repeated_landmarks", + Accessibility, + "이름 없이 반복되는 nav·aside 랜드마크", + ), + ( + "accessibility.redundant_alt", + Accessibility, + "중복 표현이 든 alt (\"이미지\", \"image of\" 등)", + ), + ( + "accessibility.empty_summary", + Accessibility, + "비어 있는 details summary", + ), + ( + "accessibility.page_title_generic", + Accessibility, + "기본값 그대로인 페이지 제목 (\"React App\" 등)", + ), + ( + "accessibility.markup_errors", + Accessibility, + "HTML 마크업 오류 (파서 오류)", + ), + ( + "accessibility.aria_invalid_value", + Accessibility, + "허용되지 않는 ARIA 속성 값", + ), + ( + "accessibility.aria_name_prohibited", + Accessibility, + "이름을 붙일 수 없는 요소의 aria-label", + ), + ( + "accessibility.aria_required_children", + Accessibility, + "필수 자식 역할이 없는 ARIA 컨테이너", + ), + ( + "accessibility.aria_required_parent", + Accessibility, + "필수 부모 역할이 없는 ARIA 요소", + ), + ( + "accessibility.aria_deprecated_role", + Accessibility, + "폐기된 ARIA 역할", + ), + ( + "accessibility.status_widget_unnamed", + Accessibility, + "이름 없는 progress·meter·tooltip", + ), + ( + "accessibility.label_title_only", + Accessibility, + "title 속성만으로 이름이 붙은 입력 요소", + ), + ( + "accessibility.multiple_labels", + Accessibility, + "label 이 둘 이상 연결된 입력 요소", + ), + ( + "accessibility.label_name_mismatch", + Accessibility, + "보이는 텍스트를 포함하지 않는 aria-label", + ), + ( + "accessibility.landmark_not_top_level", + Accessibility, + "다른 랜드마크 안에 든 main·banner·contentinfo", + ), + ( + "accessibility.duplicate_banner", + Accessibility, + "banner(최상위 header) 중복", + ), + ( + "accessibility.duplicate_contentinfo", + Accessibility, + "contentinfo(최상위 footer) 중복", + ), + ( + "accessibility.content_outside_landmarks", + Accessibility, + "랜드마크 밖의 본문 텍스트", + ), + ( + "accessibility.iframe_title_duplicate", + Accessibility, + "같은 title 을 쓰는 iframe", + ), + ( + "accessibility.html_xml_lang_mismatch", + Accessibility, + "html 의 lang 과 xml:lang 불일치", + ), + ( + "accessibility.server_side_image_map", + Accessibility, + "서버 측 이미지맵 (img ismap)", + ), + ( + "accessibility.definition_list_invalid", + Accessibility, + "잘못된 정의 목록 구조 (dl·dt·dd)", + ), + ( + "accessibility.table_caption_missing", + Accessibility, + "제목(caption) 없는 데이터 표", + ), + ( + "accessibility.inline_spacing_important", + Accessibility, + "글자·줄 간격을 !important 로 고정한 인라인 스타일", + ), + ( + "accessibility.paste_blocked", + Accessibility, + "붙여넣기를 막은 입력 요소", + ), + ( + "accessibility.identical_link_text", + Accessibility, + "같은 텍스트인데 목적지가 다른 링크", + ), + ( + "accessibility.orientation_lock", + Accessibility, + "화면 방향 고정 (orientation 미디어 쿼리 + 회전)", + ), + ( + "accessibility.viewport_fixed_width", + Accessibility, + "고정 너비 viewport (리플로 불가)", + ), + ( + "accessibility.site_search", + Accessibility, + "사이트 검색 (search 요소·role=search·type=search)", + ), + ( + "accessibility.breadcrumb_nav", + Accessibility, + "이동 경로(브레드크럼) 표시", + ), + ( + "accessibility.abbr_without_title", + Accessibility, + "title 없는 abbr (약어 설명 없음)", + ), + ( + "accessibility.onchange_navigation", + Accessibility, + "값만 바꿔도 이동·제출하는 onchange", + ), + ( + "accessibility.password_autocomplete_off", + Accessibility, + "자동 완성을 끈 비밀번호 칸", + ), + ( + "accessibility.reduced_motion", + Accessibility, + "움직임 줄이기 설정 대응 (prefers-reduced-motion)", + ), + ( + "accessibility.justified_text", + Accessibility, + "양쪽 정렬 텍스트 (text-align: justify)", + ), + ( + "accessibility.obsolete_attributes", + Accessibility, + "폐기된 HTML 속성 (align·bgcolor·border 등)", + ), + ( + "accessibility.onfocus_navigation", + Accessibility, + "초점만 받아도 이동·제출하는 onfocus", + ), + ( + "accessibility.video_audio_description_missing", + Accessibility, + "음성 해설 트랙 없는 영상", + ), + ( + "accessibility.statement_link", + Accessibility, + "접근성 성명(정책) 링크", + ), + ( + "accessibility.media_controls_missing", + Accessibility, + "기본 컨트롤 없는 video·audio", + ), + ( + "accessibility.aria_role_redundant", + Accessibility, + "암묵 역할과 같은 명시 role", + ), + ( + "accessibility.aria_role_not_allowed", + Accessibility, + "요소에 허용되지 않는 role", + ), + ( + "accessibility.aria_attr_on_prohibited_element", + Accessibility, + "aria-* 를 쓸 수 없는 요소의 aria 속성", + ), + ( + "accessibility.aria_attr_not_allowed_for_role", + Accessibility, + "역할에 허용되지 않는 aria-* 속성", + ), + ( + "accessibility.aria_html_attr_conflict", + Accessibility, + "HTML 속성과 충돌하는 aria-*", + ), + ( + "accessibility.aria_html_attr_redundant", + Accessibility, + "HTML 속성과 중복된 aria-*", + ), + ( + "accessibility.aria_deprecated_attr", + Accessibility, + "폐기된 ARIA 속성 (aria-grabbed·aria-dropeffect)", + ), + ( + "accessibility.presentational_children_roles", + Accessibility, + "자식이 무시되는 역할 안의 의미 요소", + ), + ( + "accessibility.presentation_semantic_children", + Accessibility, + "role=presentation 인데 의미 구조를 가진 표·목록", + ), + ( + "accessibility.duplicate_landmark_names", + Accessibility, + "같은 역할·같은 이름의 랜드마크", + ), + ( + "accessibility.landmark_role_unnamed", + Accessibility, + "이름 없는 region·application", + ), + ( + "accessibility.activedescendant_unfocusable", + Accessibility, + "초점을 받을 수 없는 aria-activedescendant 소유자", + ), + ( + "accessibility.combobox_pattern_invalid", + Accessibility, + "잘못된 combobox 패턴", + ), + ( + "accessibility.tabbable_non_interactive", + Accessibility, + "역할 없이 tabindex 로 초점을 받는 요소", + ), + ( + "accessibility.iframe_tabindex_negative", + Accessibility, + "tabindex=-1 로 탭 순서에서 빠진 iframe", + ), + ( + "accessibility.empty_labels", + Accessibility, + "내용 없는 label", + ), + ( + "accessibility.label_for_not_control", + Accessibility, + "입력 요소가 아닌 대상을 가리키는 label[for]", + ), + ( + "accessibility.placeholder_only_label", + Accessibility, + "placeholder 외에 보이는 레이블이 없는 입력", + ), + ( + "accessibility.form_submit_missing", + Accessibility, + "제출 버튼 없는 form", + ), + ( + "accessibility.decorative_img_conflict", + Accessibility, + "장식 표시가 충돌하는 이미지", + ), + ( + "accessibility.alt_redundant_with_text", + Accessibility, + "링크 텍스트와 중복된 이미지 alt", + ), + ( + "accessibility.adjacent_duplicate_links", + Accessibility, + "같은 URL 로 가는 연속 링크", + ), + ( + "accessibility.figure_unlabeled", + Accessibility, + "캡션·이름 없는 figure", + ), + ( + "accessibility.canvas_fallback_missing", + Accessibility, + "대체 콘텐츠 없는 canvas", + ), + ( + "accessibility.redundant_title_attr", + Accessibility, + "텍스트와 같은 title 속성", + ), + ( + "accessibility.broken_fragment_links", + Accessibility, + "대상이 없는 같은 페이지 링크 (건너뛰기 링크 포함)", + ), + ( + "accessibility.mouse_only_handlers", + Accessibility, + "키보드 대응 없는 마우스 이벤트", + ), + ( + "accessibility.css_blink", + Accessibility, + "CSS text-decoration: blink", + ), + ( + "accessibility.xml_lang_without_lang", + Accessibility, + "lang 없는 xml:lang·불일치", + ), + ("accessibility.dir_invalid", Accessibility, "잘못된 dir 값"), + ( + "accessibility.rtl_dir_missing", + Accessibility, + "RTL 언어인데 dir=rtl 없음", + ), + ( + "accessibility.css_direction", + Accessibility, + "CSS 로 지정한 글 방향 (direction·unicode-bidi)", + ), + ( + "accessibility.bdo_without_dir", + Accessibility, + "dir 없는(또는 auto) bdo", + ), + ( + "accessibility.translate_invalid", + Accessibility, + "잘못된 translate 값", + ), + ( + "accessibility.ruby_without_rt", + Accessibility, + "rt 없는 ruby", + ), + ( + "accessibility.invalid_nesting", + Accessibility, + "허용되지 않는 요소 중첩", + ), + ( + "accessibility.phrasing_content_violation", + Accessibility, + "구문 전용 요소 안의 블록 요소", + ), + ( + "accessibility.form_conformance_errors", + Accessibility, + "폼 요소 적합성 오류", + ), + ( + "accessibility.summary_display_changed", + Accessibility, + "summary 의 display 변경", + ), + ( + "accessibility.statement_feedback", + Accessibility, + "접근성 성명 피드백 수단 (메일·전화·양식)", + ), + ( + "accessibility.definition_list_duplicate_terms", + Accessibility, + "같은 dl 안에서 반복된 dt", + ), + ("trust.privacy_policy", Trust, "개인정보처리방침 링크"), + ("trust.terms", Trust, "이용약관 링크"), + ("trust.phone", Trust, "전화번호 링크 (tel:)"), + ("trust.email", Trust, "이메일 링크 (mailto:)"), + ( + "trust.address", + Trust, + "주소 (
    또는 스키마 address)", + ), + ("trust.social_links", Trust, "SNS 링크"), + ("trust.business_number", Trust, "사업자등록번호 표기"), + ("trust.copyright_year", Trust, "저작권 연도 표기"), + ("trust.gpc", Trust, "Global Privacy Control (gpc.json)"), + ("meta.bing_site_verification", Meta, "Bing 웹마스터 인증"), + ("meta.amphtml", Meta, "AMP 링크 (rel=amphtml)"), + ( + "meta.app_link_meta", + Meta, + "앱 연결 메타 (apple-itunes-app·al:*)", + ), + ( + "meta.apple_app_site_association", + Meta, + "/.well-known/apple-app-site-association", + ), + ("meta.assetlinks", Meta, "/.well-known/assetlinks.json"), + ("meta.manifest_content", Meta, "manifest 내용"), + ( + "meta.manifest_icons_192_512", + Meta, + "manifest 192·512px 아이콘", + ), + ("meta.favicon_size", Meta, "favicon 실제 크기"), + ("crawling.etag", Crawling, "ETag 헤더"), + ("crawling.last_modified", Crawling, "Last-Modified 헤더"), + ("crawling.vary_user_agent", Crawling, "Vary: User-Agent"), + ("security.server_header", Security, "Server 헤더 노출"), + ("security.x_powered_by", Security, "X-Powered-By 헤더 노출"), + ( + "security.insecure_cookies", + Security, + "Secure·HttpOnly·SameSite 누락 쿠키", + ), + ( + "security.cross_origin_opener_policy", + Security, + "Cross-Origin-Opener-Policy", + ), + ( + "security.cross_origin_embedder_policy", + Security, + "Cross-Origin-Embedder-Policy", + ), + ( + "security.cross_origin_resource_policy", + Security, + "Cross-Origin-Resource-Policy", + ), + ( + "security.sri_missing", + Security, + "SRI(integrity) 없는 외부 스크립트·스타일시트", + ), + ( + "security.insecure_form_action", + Security, + "https 페이지에서 http 로 보내는 폼", + ), + ( + "security.target_blank_noopener", + Security, + "rel=noopener 없는 새 창 링크", + ), + ( + "security.trusted_types", + Security, + "Trusted Types (CSP require-trusted-types-for)", + ), + ( + "security.x_dns_prefetch_control", + Security, + "X-DNS-Prefetch-Control", + ), + ( + "security.x_permitted_cross_domain_policies", + Security, + "X-Permitted-Cross-Domain-Policies", + ), + ( + "security.info_disclosure_headers", + Security, + "버전·내부 정보를 노출하는 헤더 (OWASP 제거 권장)", + ), + ( + "security.deprecated_headers", + Security, + "폐기된 응답 헤더 (X-XSS-Protection·Expect-CT 등)", + ), + ("security.csp_meta", Security, "meta 태그 CSP"), + ( + "security.csp_unsafe_inline", + Security, + "CSP script-src 'unsafe-inline' 허용", + ), + ( + "security.csp_unsafe_eval", + Security, + "CSP 'unsafe-eval' 허용", + ), + ( + "security.csp_broad_script_source", + Security, + "CSP script-src 과다 허용 (*·https: 등)", + ), + ( + "security.csp_object_src_unrestricted", + Security, + "CSP object-src 미제한", + ), + ( + "security.csp_unsafe_inline_style", + Security, + "CSP style-src 'unsafe-inline' 허용", + ), + ( + "security.csp_base_uri_unrestricted", + Security, + "CSP base-uri 미제한", + ), + ( + "security.csp_form_action_unrestricted", + Security, + "CSP form-action 미제한", + ), + ( + "security.csp_default_src_missing", + Security, + "CSP default-src 없음", + ), + ( + "security.csp_strict_dynamic_without_nonce", + Security, + "CSP strict-dynamic 에 nonce·hash 없음", + ), + ( + "security.csp_duplicate_directives", + Security, + "CSP 지시어 중복", + ), + ( + "security.csp_insecure_scheme", + Security, + "CSP 에 http: 출처", + ), + ( + "security.csp_report_only_only", + Security, + "CSP 보고 전용만 설정", + ), + ( + "security.clickjacking_unprotected", + Security, + "클릭재킹 방어 없음 (X-Frame-Options·frame-ancestors)", + ), + ( + "security.x_frame_options_invalid", + Security, + "X-Frame-Options 값 오류", + ), + ( + "security.x_content_type_options_invalid", + Security, + "X-Content-Type-Options 값 오류", + ), + ( + "security.referrer_policy_unsafe", + Security, + "안전하지 않은 Referrer-Policy", + ), + ( + "security.cross_origin_policy_invalid", + Security, + "COOP·COEP·CORP 값 오류", + ), + ( + "security.cors_wildcard", + Security, + "CORS 전체 허용 (Access-Control-Allow-Origin: *)", + ), + ("security.hpkp", Security, "폐기된 HPKP 헤더"), + ("security.p3p", Security, "폐기된 P3P 정책"), + ( + "security.cookie_samesite_invalid", + Security, + "쿠키 SameSite 값 오류", + ), + ( + "security.session_cookie_flags", + Security, + "세션·CSRF 쿠키 보호 속성 누락", + ), + ( + "security.cookie_prefix_invalid", + Security, + "__Host-·__Secure- 쿠키 접두사 오류", + ), + ( + "security.cookie_syntax_invalid", + Security, + "Set-Cookie 문법 오류", + ), + ("security.sri_invalid", Security, "integrity 속성 오류"), + ( + "security.protocol_relative_urls", + Security, + "프로토콜 상대 URL (//)", + ), + ( + "security.change_password_url", + Security, + "비밀번호 변경 URL (/.well-known/change-password)", + ), + ( + "security.inline_event_handlers", + Security, + "인라인 이벤트 핸들러 (onclick 등)", + ), + ( + "security.cors_reflects_origin_credentials", + Security, + "CORS Origin 반사 + 자격증명 허용", + ), + ( + "security.vulnerable_js_libraries", + Security, + "알려진 취약 버전 JS 라이브러리", + ), + ( + "performance.static_asset_cache", + Performance, + "정적 리소스 Cache-Control", + ), + ("performance.dom_size", Performance, "DOM 크기"), + ( + "performance.third_party_scripts", + Performance, + "서드파티 스크립트 호스트", + ), + ("crawling.ads_txt", Crawling, "ads.txt"), + ( + "crawling.robots_oversize", + Crawling, + "robots.txt 500KiB 초과", + ), + ( + "crawling.robots_crawl_delay", + Crawling, + "robots.txt Crawl-delay", + ), + ( + "crawling.robots_invalid_lines", + Crawling, + "robots.txt 해석 불가 줄", + ), + ( + "crawling.sitemap_oversize", + Crawling, + "sitemap 한도 초과 (50MB 또는 5만 URL)", + ), + ( + "crawling.script_cache_busting", + Crawling, + "JS URL 의 타임스탬프·해시 쿼리", + ), + ( + "crawling.robots_blocks_resources_yeti", + Crawling, + "robots.txt 가 CSS/JS 차단 (Yeti)", + ), + ( + "crawling.robots_blocks_resources_bingbot", + Crawling, + "robots.txt 가 CSS/JS 차단 (Bingbot)", + ), + ( + "crawling.robots_blocks_favicon", + Crawling, + "robots.txt 가 favicon 차단", + ), + ( + "crawling.sitemap_over_10mb", + Crawling, + "sitemap 10MB 이상 (네이버 제출 한도)", + ), + ( + "crawling.ua_access.yeti", + Crawling, + "검색 크롤러 UA 응답 (yeti)", + ), + ( + "crawling.ua_access.bingbot", + Crawling, + "검색 크롤러 UA 응답 (bingbot)", + ), + ( + "crawling.ua_access.applebot", + Crawling, + "검색 크롤러 UA 응답 (applebot)", + ), + ( + "crawling.ua_access.daum", + Crawling, + "검색 크롤러 UA 응답 (daum)", + ), + ( + "crawling.ua_access.googlebot_smartphone", + Crawling, + "검색 크롤러 UA 응답 (googlebot_smartphone)", + ), + ("crawling.feed_valid", Crawling, "피드 형식 유효 (RSS·Atom)"), + ("crawling.feed_items", Crawling, "피드 item 수"), + ( + "crawling.feed_foreign_host", + Crawling, + "피드 안 다른 호스트·상대 경로 URL", + ), + ("crawling.feed_oversize", Crawling, "피드 10MB 이상"), + ( + "crawling.feed_full_content", + Crawling, + "피드 본문 전체 포함", + ), + ( + "crawling.robots_encoding", + Crawling, + "robots.txt UTF-8 인코딩", + ), + ( + "crawling.sitemap_redirected_urls", + Crawling, + "sitemap 표본 중 리다이렉트되는 URL", + ), + ("crawling.indexnow_key_file", Crawling, "IndexNow 키 파일"), + ( + "crawling.robots_content_type", + Crawling, + "robots.txt text/plain", + ), + ( + "crawling.robots_orphan_rules", + Crawling, + "그룹 밖 Allow/Disallow", + ), + ( + "crawling.robots_unreachable", + Crawling, + "robots.txt 5xx·네트워크 오류 (전체 차단으로 간주)", + ), + ( + "crawling.robots_redirect_hops", + Crawling, + "robots.txt 리다이렉트 5회 초과", + ), + ( + "crawling.sitemap_namespace", + Crawling, + "sitemap 네임스페이스", + ), + ( + "crawling.sitemap_invalid_priority", + Crawling, + "sitemap priority 범위 밖", + ), + ( + "crawling.sitemap_invalid_changefreq", + Crawling, + "sitemap changefreq 허용값 밖", + ), + ( + "crawling.sitemap_invalid_lastmod", + Crawling, + "sitemap lastmod W3C Datetime 형식 오류", + ), + ( + "crawling.sitemap_unescaped_entities", + Crawling, + "sitemap 엔티티 미이스케이프 (&)", + ), + ( + "crawling.sitemap_invalid_loc", + Crawling, + "sitemap loc 형식 오류", + ), + ( + "crawling.sitemap_out_of_scope", + Crawling, + "sitemap 위치 밖 URL", + ), + ("crawling.sitemap_encoding", Crawling, "sitemap UTF-8"), + ( + "crawling.robots_rule_errors", + Crawling, + "robots.txt 규칙 형식 오류", + ), + ( + "crawling.robots_unsupported_directives", + Crawling, + "robots.txt 미지원 지시자 (noindex·host 등)", + ), + ( + "crawling.robots_clean_param", + Crawling, + "robots.txt Clean-param (Yandex)", + ), + ( + "crawling.robots_blocks_favicon_googlebot", + Crawling, + "robots.txt 가 favicon 차단 (Googlebot-Image)", + ), + ( + "crawling.sitemap_future_lastmod", + Crawling, + "sitemap 미래 lastmod", + ), + ( + "crawling.sitemap_invalid_xml", + Crawling, + "sitemap 구조 오류 (루트·loc 없는 url·중첩 index)", + ), + ( + "crawling.sitemap_extensions", + Crawling, + "sitemap 확장 (image·video·news·hreflang)", + ), + ( + "crawling.sitemap_extension_errors", + Crawling, + "sitemap 확장 태그 오류", + ), + ( + "crawling.sitemap_news_stale", + Crawling, + "news sitemap 의 2일 지난 기사", + ), + ( + "crawling.sitemap_blocked_by_robots", + Crawling, + "robots.txt 가 sitemap 파일을 차단", + ), + ( + "crawling.over_googlebot_size_limit", + Crawling, + "Googlebot 2MB 초과 (HTML·JS)", + ), + ( + "crawling.conditional_request_304", + Crawling, + "조건부 요청 304 지원", + ), + ("crawling.rel_next_prev", Crawling, "rel=next·prev"), + ( + "crawling.dynamic_serving_without_vary", + Crawling, + "UA 별 다른 HTML 인데 Vary: User-Agent 없음", + ), + ("geo.question_headings", Geo, "질문형 헤딩 (h2~h4)"), + ("geo.lists", Geo, "목록 (항목 2개 이상 ul/ol, dl)"), + ("geo.tables", Geo, "표"), + ("geo.noscript_content", Geo, "noscript 대체 콘텐츠"), + ( + "geo.ard_manifest", + Geo, + "ARD 매니페스트 (AI 에이전트용 리소스 목록)", + ), + ("geo.ai_catalog_legacy", Geo, "ARD 이전 위치 (ai-catalog)"), + ( + "geo.webmcp_forms", + Geo, + "WebMCP 선언형 주석이 있는 폼 (toolname)", + ), + ( + "geo.webmcp_script", + Geo, + "WebMCP 명령형 API 사용 흔적 (navigator.modelContext)", + ), + ( + "geo.copilot_restrictions", + Geo, + "Copilot 인용 제한 (noarchive·nocache)", + ), + ( + "geo.bing_ai_preferences", + Geo, + "Bing AI 학습·그라운딩 선호 표시", + ), + ( + "geo.llms_txt_link_format", + Geo, + "llms.txt 링크 항목 형식 오류", + ), + ("geo.llms_txt_extra_headings", Geo, "llms.txt 규격 밖 헤딩"), + ( + "geo.llms_txt_optional_section", + Geo, + "llms.txt Optional 섹션", + ), + ( + "geo.llms_txt_describedby", + Geo, + "llms.txt 연결 (rel=describedby)", + ), + ("geo.llms_txt_subpath", Geo, "하위 경로 llms.txt"), + ("geo.content_signals", Geo, "Content-Signal (robots.txt)"), + ( + "geo.content_usage", + Geo, + "AI 사용 선호 (IETF aipref Content-Usage)", + ), + ("geo.rsl_license", Geo, "RSL 라이선스 선언"), + ("geo.tdm_policy", Geo, "TDM 정책 URL (tdm-policy)"), + ("geo.tdm_reservation_invalid", Geo, "TDM 예약 값 오류"), + ("geo.a2a_agent_card", Geo, "A2A 에이전트 카드"), + ("geo.quotations", Geo, "인용문 (blockquote·q)"), + ("geo.statistics", Geo, "수치·통계 표기"), + ("geo.future_dates", Geo, "미래·역전된 게시일·수정일"), + ( + "structured_data.speakable", + StructuredData, + "speakable 속성", + ), + ( + "meta.canonical_target_noindex", Meta, - "앱 연결 메타 (apple-itunes-app·al:*)", + "canonical 대상 페이지 noindex", + ), + ( + "meta.canonical_target_mismatch", + Meta, + "canonical 대상이 2xx 아님 또는 다른 canonical", + ), + ("meta.doctype", Meta, "HTML5 doctype ()"), + ("meta.manifest_id", Meta, "manifest id"), + ("meta.manifest_scope", Meta, "manifest scope"), + ("meta.manifest_description", Meta, "manifest description"), + ("meta.manifest_screenshots", Meta, "manifest screenshots"), + ("meta.manifest_shortcuts", Meta, "manifest shortcuts"), + ( + "meta.manifest_maskable_icon", + Meta, + "manifest maskable 아이콘", + ), + ( + "meta.manifest_colors", + Meta, + "manifest theme_color·background_color", + ), + ( + "meta.manifest_display_valid", + Meta, + "manifest display 값 (fullscreen·standalone·minimal-ui·browser)", + ), + ("meta.canonical_relative", Meta, "canonical 상대 경로"), + ("meta.favicon_relative_href", Meta, "favicon 상대 경로"), + ( + "meta.favicon_duplicate_rel", + Meta, + "같은 rel 의 favicon 중복", + ), + ("meta.charset_mismatch", Meta, "헤더·meta charset 불일치"), + ( + "meta.head_elements_in_body", + Meta, + "body 안에 있는 head 전용 요소", + ), + ( + "meta.description_same_as_title", + Meta, + "description 이 title 과 동일", + ), + ("meta.repeated_terms", Meta, "title·description 반복 단어"), + ( + "meta.mobile_site_canonical", + Meta, + "모바일 사이트 → 데스크톱 canonical", + ), + ( + "meta.bing_site_auth_file", + Meta, + "Bing 사이트 인증 파일 (/BingSiteAuth.xml)", + ), + ("meta.x_ua_compatible", Meta, "X-UA-Compatible (IE 전용)"), + ("meta.bom", Meta, "BOM 으로 시작하는 문서"), + ("meta.charset_not_utf8", Meta, "UTF-8 이 아닌 문자 인코딩"), + ( + "meta.charset_late", + Meta, + "늦게 선언된 charset (1024바이트 밖·head 첫 요소 아님)", + ), + ("meta.charset_duplicate", Meta, "charset 선언 중복"), + ("meta.viewport_invalid", Meta, "viewport 값 오류"), + ("meta.theme_color_invalid", Meta, "theme-color 값 오류"), + ( + "meta.manifest_name_length", + Meta, + "manifest name·short_name 길이", + ), + ( + "meta.manifest_file_extension", + Meta, + "manifest 확장자 (.webmanifest)", + ), + ( + "meta.manifest_start_url_scope", + Meta, + "manifest start_url 범위 오류", + ), + ( + "meta.canonical_header", + Meta, + "canonical HTTP 헤더 (Link rel=canonical)", + ), + ( + "meta.canonical_conflict", + Meta, + "canonical 지정 방식 간 불일치 (HTML·헤더)", + ), + ("meta.canonical_fragment", Meta, "canonical 에 # 프래그먼트"), + ( + "meta.paginated_canonical_to_first", + Meta, + "페이지네이션 2쪽 이상의 canonical 이 1쪽", + ), + ("meta.rating", Meta, "SafeSearch 성인 표시 (meta rating)"), + ( + "meta.yandex_site_verification", + Meta, + "Yandex 웹마스터 인증", + ), + ( + "meta.favicon_google_eligible", + Meta, + "Google 파비콘 요건 (정사각형·8px 이상·형식)", + ), + ( + "meta.title_half_empty", + Meta, + "반쪽 title (구분자로 시작·끝남)", + ), + ( + "meta.title_script_mismatch", + Meta, + "title 과 본문의 문자 체계 불일치", + ), + ( + "meta.apple_app_site_association_valid", + Meta, + "AASA 파일 요건 위반", + ), + ( + "meta.apple_itunes_app_valid", + Meta, + "apple-itunes-app 형식 오류", + ), + ("meta.bom_in_content", Meta, "본문 중간의 BOM (U+FEFF)"), + ("meta.xml_declaration", Meta, "text/html 문서의 XML 선언"), + ( + "meta.content_language_meta", + Meta, + "폐기된 Content-Language meta", + ), + ( + "meta.http_equiv_invalid", + Meta, + "브라우저가 무시하는 http-equiv", + ), + ( + "meta.base_after_resources", + Meta, + "link·script 뒤에 온 base (또는 base 여러 개)", + ), + ( + "meta.mobile_alternate_mismatch", + Meta, + "별도 모바일 URL 과 메타 불일치", + ), + ( + "meta.apple_touch_icon_spec", + Meta, + "apple-touch-icon PNG 180×180", + ), + ( + "meta.manifest_icon_size_mismatch", + Meta, + "manifest 아이콘의 선언 크기와 실제 크기 불일치", + ), + ( + "structured_data.hreflang_reciprocal", + StructuredData, + "hreflang 상호 참조", + ), + ( + "structured_data.unknown_types", + StructuredData, + "schema.org 에 없는 @type", ), + ("structured_data.rdfa", StructuredData, "RDFa"), ( - "meta.apple_app_site_association", - Meta, - "/.well-known/apple-app-site-association", + "structured_data.microformats", + StructuredData, + "Microformats (hCard·hRecipe·hReview 등)", ), - ("meta.assetlinks", Meta, "/.well-known/assetlinks.json"), - ("meta.manifest_content", Meta, "manifest 내용"), ( - "meta.manifest_icons_192_512", - Meta, - "manifest 192·512px 아이콘", + "structured_data.naver.postal_address", + StructuredData, + "네이버 주소 필수 속성", ), - ("meta.favicon_size", Meta, "favicon 실제 크기"), - ("crawling.etag", Crawling, "ETag 헤더"), - ("crawling.last_modified", Crawling, "Last-Modified 헤더"), - ("crawling.vary_user_agent", Crawling, "Vary: User-Agent"), - ("security.server_header", Security, "Server 헤더 노출"), - ("security.x_powered_by", Security, "X-Powered-By 헤더 노출"), ( - "security.insecure_cookies", - Security, - "Secure·HttpOnly·SameSite 누락 쿠키", + "structured_data.naver.breadcrumb_list", + StructuredData, + "네이버 이동 경로 필수 속성", ), ( - "performance.static_asset_cache", - Performance, - "정적 리소스 Cache-Control", + "structured_data.naver.carousel", + StructuredData, + "네이버 캐러셀 필수 속성", ), - ("performance.dom_size", Performance, "DOM 크기"), ( - "performance.third_party_scripts", - Performance, - "서드파티 스크립트 호스트", + "structured_data.naver.channel", + StructuredData, + "네이버 연관 채널 필수 속성", ), - ("crawling.ads_txt", Crawling, "ads.txt"), ( - "crawling.robots_oversize", - Crawling, - "robots.txt 500KiB 초과", + "structured_data.naver.movie", + StructuredData, + "네이버 영화 필수 속성", ), ( - "crawling.robots_crawl_delay", - Crawling, - "robots.txt Crawl-delay", + "structured_data.naver.aggregate_rating", + StructuredData, + "네이버 평점 필수 속성", ), ( - "crawling.robots_invalid_lines", - Crawling, - "robots.txt 해석 불가 줄", + "structured_data.naver.recipe", + StructuredData, + "네이버 레시피 필수 속성", ), ( - "crawling.sitemap_oversize", - Crawling, - "sitemap 한도 초과 (50MB 또는 5만 URL)", + "structured_data.naver.restaurant", + StructuredData, + "네이버 식당 필수 속성", ), - ("geo.question_headings", Geo, "질문형 헤딩 (h2~h4)"), - ("geo.lists", Geo, "목록 (항목 2개 이상 ul/ol, dl)"), - ("geo.tables", Geo, "표"), - ("geo.noscript_content", Geo, "noscript 대체 콘텐츠"), ( - "structured_data.speakable", + "structured_data.naver.review", StructuredData, - "speakable 속성", + "네이버 리뷰 필수 속성", ), ( - "meta.canonical_target_noindex", - Meta, - "canonical 대상 페이지 noindex", + "structured_data.naver.software_app", + StructuredData, + "네이버 소프트웨어 필수 속성", ), ( - "meta.canonical_target_mismatch", - Meta, - "canonical 대상이 2xx 아님 또는 다른 canonical", + "structured_data.naver.tv_series", + StructuredData, + "네이버 TV 시리즈 필수 속성", ), ( - "structured_data.hreflang_reciprocal", + "structured_data.naver.video", StructuredData, - "hreflang 상호 참조", + "네이버 동영상 필수 속성", + ), + ( + "structured_data.naver.video_channel", + StructuredData, + "네이버 동영상 채널 필수 속성", + ), + ( + "structured_data.hreflang_invalid", + StructuredData, + "잘못된 hreflang (코드·URL·media·중복)", + ), + ( + "structured_data.hreflang_other_sources", + StructuredData, + "hreflang (HTTP 헤더·sitemap)", + ), + ( + "structured_data.hreflang_canonical_conflict", + StructuredData, + "canonical 이 다른 언어 버전을 가리킴", + ), + ( + "structured_data.website_duplicate", + StructuredData, + "WebSite 구조화 데이터 중복", + ), + ( + "structured_data.site_name_mismatch", + StructuredData, + "WebSite.name 과 og:site_name 불일치", + ), + ( + "structured_data.is_accessible_for_free", + StructuredData, + "isAccessibleForFree (유료 콘텐츠 표시)", + ), + ( + "structured_data.accessibility_metadata", + StructuredData, + "schema.org 접근성 메타데이터", + ), + ( + "structured_data.microdata_invalid", + StructuredData, + "잘못된 microdata (itemprop·itemref·itemtype)", ), ("performance.external_css", Performance, "외부 CSS 분석"), ( @@ -708,6 +2382,192 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ "font-display 없는 @font-face", ), ("performance.page_weight", Performance, "페이지 리소스 무게"), + ( + "performance.lcp_image_lazy", + Performance, + "첫 이미지(LCP 후보) 지연 로딩", + ), + ( + "performance.fetchpriority_high", + Performance, + "fetchpriority=\"high\" 지정", + ), + ( + "performance.document_write", + Performance, + "인라인 스크립트의 document.write", + ), + ("performance.css_import", Performance, "CSS @import"), + ( + "performance.duplicate_scripts", + Performance, + "중복으로 넣은 스크립트", + ), + ( + "performance.inline_code_bytes", + Performance, + "인라인 스크립트·스타일 크기", + ), + ( + "performance.bfcache_blocked", + Performance, + "bfcache 차단 요인 (no-store, unload)", + ), + ( + "performance.large_scripts", + Performance, + "큰 스크립트 파일 (500KB 초과)", + ), + ( + "performance.large_images", + Performance, + "큰 이미지 파일 (500KB 초과)", + ), + ( + "performance.unminified_css", + Performance, + "압축(minify)되지 않은 CSS", + ), + ( + "performance.large_gifs", + Performance, + "큰 GIF 이미지 (100KB 초과)", + ), + ( + "performance.cache_control_conflict", + Performance, + "Cache-Control 지시어 충돌·오류", + ), + ( + "performance.vary_accept_encoding_missing", + Performance, + "압축 응답에 Vary: Accept-Encoding 없음", + ), + ( + "performance.empty_src", + Performance, + "빈 src·href (페이지 자신을 다시 요청)", + ), + ( + "performance.srcset_sizes_invalid", + Performance, + "srcset w 서술자에 sizes 누락 등", + ), + ( + "performance.preload_invalid", + Performance, + "잘못된 preload (as 누락·글꼴 crossorigin 누락)", + ), + ( + "performance.script_attr_ineffective", + Performance, + "효과 없는·잘못된 script 속성", + ), + ( + "performance.script_json_invalid", + Performance, + "importmap·speculationrules JSON 오류", + ), + ( + "performance.speculation_rules", + Performance, + "Speculation Rules (prefetch·prerender)", + ), + ( + "performance.excess_preconnect", + Performance, + "preconnect 4개 초과", + ), + ( + "performance.preconnect_unused", + Performance, + "참조되지 않는 preconnect 출처", + ), + ( + "performance.preconnect_crossorigin_missing", + Performance, + "글꼴 출처 preconnect 의 crossorigin 누락", + ), + ( + "performance.iframe_lazy", + Performance, + "loading=lazy 없는 iframe (첫 번째 제외)", + ), + ( + "performance.third_party_embeds", + Performance, + "무거운 서드파티 임베드 (파사드 후보)", + ), + ( + "performance.video_preload", + Performance, + "preload 를 줄이지 않은 video", + ), + ( + "performance.img_decoding", + Performance, + "decoding=async 이미지", + ), + ( + "performance.inline_style_attrs", + Performance, + "style 속성 사용 요소", + ), + ( + "performance.legacy_font_formats", + Performance, + "WOFF2 없는 글꼴 (ttf·otf·eot)", + ), + ( + "performance.content_visibility", + Performance, + "content-visibility 사용", + ), + ( + "performance.layout_animations", + Performance, + "레이아웃 속성을 움직이는 @keyframes", + ), + ( + "performance.css_prefix_order", + Performance, + "표준 속성 뒤의 접두사 속성", + ), + ( + "performance.server_timing", + Performance, + "Server-Timing 헤더", + ), + ( + "performance.link_header_preload", + Performance, + "Link 헤더 preload·preconnect", + ), + ( + "performance.asset_compression", + Performance, + "압축 없이 전달되는 CSS·JS", + ), + ( + "performance.asset_redirects", + Performance, + "리다이렉트되는 JS", + ), + ( + "performance.unminified_js", + Performance, + "압축(minify)되지 않은 JS", + ), + ( + "performance.legacy_javascript", + Performance, + "레거시 JS (Babel 변환·폴리필 흔적)", + ), + ( + "performance.html_only_headers", + Performance, + "HTML 이 아닌 응답의 HTML 전용 헤더", + ), ("site.pages_sampled", Site, "표본 페이지 수집"), ("site.failed_pages", Site, "표본 중 2xx 아닌 페이지"), ("site.duplicate_titles", Site, "페이지 간 중복 title"), @@ -757,6 +2617,97 @@ pub const CATALOG: &[(&str, Category, &str)] = &[ Transport, "클라이언트 측 리다이렉트 수", ), + ( + "transport.security_txt_fields", + Transport, + "security.txt 필수 필드 (Contact·Expires)", + ), + ( + "transport.hostname_invalid", + Transport, + "표준에 어긋난 호스트명 (밑줄 등)", + ), + ( + "transport.hosting_subdomain", + Transport, + "호스팅 제공 기본 도메인 (github.io 등)", + ), + ( + "transport.redirect_hops_excess", + Transport, + "리다이렉트 5회 초과·루프", + ), + ( + "transport.redirect_chain_robots_blocked", + Transport, + "리다이렉트 경유 URL robots 차단", + ), + ("transport.hsts_invalid", Transport, "HSTS 헤더 형식 오류"), + ( + "transport.hsts_max_age_short", + Transport, + "HSTS max-age 6개월 미만", + ), + ( + "transport.hsts_preload_ineligible", + Transport, + "HSTS preload 요건 미충족", + ), + ( + "transport.https_to_http_redirect", + Transport, + "https 에서 http 로 하향 리다이렉트", + ), + ( + "transport.content_type_invalid", + Transport, + "Content-Type 헤더 누락·오류", + ), + ( + "transport.security_txt_expired", + Transport, + "security.txt 만료", + ), + ( + "transport.security_txt_invalid", + Transport, + "security.txt 형식 위반", + ), + ( + "transport.security_txt_signed", + Transport, + "security.txt 전자서명", + ), + ( + "transport.security_txt_canonical_mismatch", + Transport, + "security.txt Canonical 에 실제 URL 없음", + ), + ( + "transport.ua_redirect_mismatch", + Transport, + "UA 별 다른 최종 호스트 (교묘한 리다이렉트 의심)", + ), + ( + "transport.asset_content_type_mismatch", + Transport, + "JavaScript 가 아닌 Content-Type 의 JS", + ), + ( + "transport.http_redirect_not_https_first", + Transport, + "http 가 https 가 아닌 곳으로 먼저 리다이렉트", + ), + ( + "transport.http_redirect_off_host", + Transport, + "http 가 다른 호스트로 먼저 리다이렉트", + ), + ( + "transport.hsts_over_http", + Transport, + "http 응답의 HSTS 헤더 (브라우저가 무시)", + ), ]; /// id 로 카탈로그 위치를 찾는다. diff --git a/crates/devup-access-checker/src/checks.rs b/crates/devup-access-checker/src/checks.rs index 6f59af6..393b012 100644 --- a/crates/devup-access-checker/src/checks.rs +++ b/crates/devup-access-checker/src/checks.rs @@ -1,5 +1,6 @@ //! 수집한 사실(fact) → `Check` 목록 변환. 네트워크 접근 없음, 점수·판정 없음. +use regex::Regex; use reqwest::header::HeaderMap; use serde_json::{Value, json}; use url::Url; @@ -19,7 +20,10 @@ pub const SEARCH_CRAWLERS: &[(&str, &str, &str)] = &[ ("googlebot", "Googlebot", "Google"), ("bingbot", "Bingbot", "Bing"), ("yeti", "Yeti", "Naver"), - ("daumoa", "Daumoa", "Daum"), + ("daum", "Daum", "Daum"), + ("googlebot_image", "Googlebot-Image", "Google 이미지"), + ("yandex", "Yandex", "Yandex"), + ("applebot", "Applebot", "Apple 검색(Siri·Spotlight)"), ]; /// 생성형 AI 크롤러 (robots.txt 허용 여부 점검 대상). @@ -42,10 +46,55 @@ pub const AI_CRAWLERS: &[(&str, &str, &str)] = &[ ("amazonbot", "Amazonbot", "Amazon"), ("bytespider", "Bytespider", "ByteDance"), ("ccbot", "CCBot", "Common Crawl"), + ( + "google_cloudvertexbot", + "Google-CloudVertexBot", + "Vertex AI 에이전트", + ), + ("googleother", "GoogleOther", "Google 범용(연구)"), + ("meta_webindexer", "meta-webindexer", "Meta AI 검색 인용"), + ("oai_adsbot", "OAI-AdsBot", "ChatGPT 광고 검증"), + ("amzn_searchbot", "Amzn-SearchBot", "Amazon 검색"), + ("amzn_user", "Amzn-User", "Amazon 사용자 요청"), + ("mistralai_user", "MistralAI-User", "Mistral 사용자 요청"), + ("mistralai_index", "MistralAI-Index", "Mistral 검색 색인"), + ("mistralai_training", "MistralAI-Training", "Mistral 학습"), + ("duckassistbot", "DuckAssistBot", "DuckDuckGo AI 답변"), + ("ai2bot", "AI2Bot", "Ai2 학습"), + ( + "webzio_extended", + "Webzio-extended", + "Webz.io AI 학습 데이터", + ), +]; + +/// 실제 User-Agent 로 페이지를 요청해 볼 검색엔진 크롤러 (가이드에 적힌 UA 문자열) +pub const SEARCH_USER_AGENTS: &[(&str, &str)] = &[ + ( + "googlebot_smartphone", + "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)", + ), + ( + "yeti", + "Mozilla/5.0 (compatible; Yeti/1.1; +https://naver.me/spd)", + ), + ( + "bingbot", + "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)", + ), + ( + "applebot", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)", + ), + ( + "daum", + "Mozilla/5.0 (compatible; Daum/4.1; +https://cs.daum.net/faq/service/15/category/4118/detail/28966)", + ), ]; /// 실제 User-Agent 로 페이지를 요청해 볼 AI 크롤러: (id 접미사, UA 문자열) pub const AI_USER_AGENTS: &[(&str, &str)] = &[ + ("ccbot", "CCBot/2.0 (https://commoncrawl.org/faq/)"), ( "gptbot", "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.2; +https://openai.com/gptbot", @@ -88,6 +137,10 @@ pub struct WellKnown { pub apple_app_site_association: FileProbe, pub assetlinks: FileProbe, pub ads_txt: FileProbe, + /// `/.well-known/ard.json` (Agentic Resource Discovery) + pub ard: FileProbe, + /// `/.well-known/ai-catalog.json` (ARD 이전 위치) + pub ai_catalog: FileProbe, } /// robots 선언 sitemap 과 sitemap 안 URL 샘플 요청 결과. @@ -97,6 +150,8 @@ pub struct SitemapDetail { pub declared: Vec, /// 샘플 URL 요청 결과 pub samples: Vec, + /// 표본을 얻지 못한 이유 (예: 하위 sitemap 읽기 실패) + pub sample_note: Option, } /// (sitemap 의 URL, 해당 URL 요청 결과) @@ -127,6 +182,30 @@ pub struct PageWeight { /// Content-Length 를 알 수 없었던 이미지 수 pub images_unknown: usize, pub image_bytes: u64, + /// [`LARGE_SCRIPT_BYTES`] 를 넘는 스크립트 (URL, 바이트), 큰 순 + pub large_scripts: Vec<(String, u64)>, + /// [`LARGE_IMAGE_BYTES`] 를 넘는 이미지 (URL, 바이트), 큰 순 + pub large_images: Vec<(String, u64)>, + /// [`LARGE_GIF_BYTES`] 를 넘는 GIF (움직이는 이미지는 동영상이 훨씬 작다) + pub large_gifs: Vec<(String, u64)>, + /// JS 표본 (URL, 결과) — 상태·Content-Type·리다이렉트·본문 분석용 + pub scripts: Vec<(String, Result)>, +} + +/// 큰 GIF 기준 (Lighthouse "효율적인 애니메이션 콘텐츠" 와 같은 100KB) +pub const LARGE_GIF_BYTES: u64 = 100 * 1024; + +/// 큰 스크립트 기준 (압축 해제 바이트) +pub const LARGE_SCRIPT_BYTES: u64 = 500 * 1024; +/// 큰 이미지 기준 (전송 바이트) +pub const LARGE_IMAGE_BYTES: u64 = 500 * 1024; + +/// 기준을 넘는 항목만 큰 순으로 최대 10개. +pub fn largest(items: impl Iterator, limit: u64) -> Vec<(String, u64)> { + let mut v: Vec<(String, u64)> = items.filter(|(_, n)| *n > limit).collect(); + v.sort_by(|a, b| b.1.cmp(&a.1).then_with(|| a.0.cmp(&b.0))); + v.truncate(10); + v } /// 클라이언트 측 리다이렉트 한 단계 (meta refresh / JavaScript). @@ -176,6 +255,56 @@ pub struct ImageInfo { pub height: Option, } +/// 접근성 성명 페이지 (URL, (상태, 본문 앞부분)) +pub type StatementProbe = (String, Result<(u16, String), String>); + +/// http 첫 응답 (상태, Location, HSTS 헤더 유무) +pub type FirstHop = (u16, Option, bool); + +/// (CSS·JS URL, (상태, Content-Encoding)) +pub type AssetEncoding = (String, Result<(u16, Option), String>); + +/// 검색엔진 가이드 대조로 추가 요청한 결과. +#[derive(Debug, Default)] +pub struct SearchProbes { + /// 페이지 경로의 디렉터리 llms.txt (예: /docs/llms.txt). None = 루트 페이지 + pub llms_subpath: Option, + /// `/.well-known/agent-card.json` (A2A). None = 수행 안 함 + pub agent_card: Option, + /// robots.txt 요청의 리다이렉트 체인. None = 수행 안 함 + pub robots_chain: Option, String>>, + /// `/.well-known/change-password` 첫 응답 (리다이렉트 1단계까지). None = 수행 안 함 + pub change_password: Option, String>>, + /// `/.well-known/gpc.json`. None = 수행 안 함 + pub gpc: Option, + /// ETag·Last-Modified 조건부 요청 상태. None = 두 헤더가 없음 + pub conditional: Option>, + /// 접근성 성명 페이지 (URL, (상태, 본문 앞부분)). None = 링크 없음 또는 수행 안 함 + pub statement: Option, + /// 별도 모바일 URL 페이지. None = 없음 또는 수행 안 함 + pub mobile_alternate: Option<(String, Result)>, + /// 임의 Origin 요청의 (ACAO, ACAC=true). None = 수행 안 함 + pub cors: Option, bool), String>>, + /// http:// 요청의 첫 응답 (상태, Location, HSTS 헤더). None = 수행 안 함 + pub http_first_hop: Option>, + /// apple-touch-icon 이미지. None = 수행 안 함 + pub apple_touch_image: Option>, + /// manifest 에서 가장 크게 선언된 아이콘 (선언 크기, 이미지). None = 해당 없음 + pub manifest_icon: Option<(String, Result)>, + /// 압축을 풀지 않고 받은 CSS·JS 표본의 (URL, (상태, Content-Encoding)) + pub asset_encodings: Vec, + /// 첫 RSS/Atom 피드 본문. None = 피드 링크 없음 또는 수행 안 함 + pub feed: Option, + /// `/BingSiteAuth.xml`. None = 수행 안 함 + pub bing_site_auth: Option, + /// 없는 경로 요청의 리다이렉트 체인. None = 수행 안 함 + pub not_found_chain: Option, String>>, + /// 리다이렉트 경유 호스트(최종 호스트 제외)의 robots.txt + pub chain_robots: Vec<(String, FileProbe)>, + /// (IndexNow 키, 키 파일 probe). None = 키를 지정하지 않음 + pub indexnow: Option<(String, Option)>, +} + /// 네트워크로 추가 수집한 B 그룹 사실. #[derive(Debug, Default)] pub struct Extended { @@ -191,6 +320,7 @@ pub struct Extended { pub now: i64, /// manifest 응답 (상태 코드, JSON). None = manifest 링크 없음 또는 수행 안 함 pub manifest: Option), String>>, + pub search: SearchProbes, /// favicon 이미지 크기. None = 수행 안 함 pub favicon_image: Option>, /// 정적 리소스 표본 (URL, 상태, 헤더). None = 같은 호스트 리소스 없음 또는 수행 안 함 @@ -252,10 +382,7 @@ pub struct Inputs<'a> { } /// (AI 크롤러 id, 해당 UA 로 요청한 결과) -pub type AiUaResult = ( - &'static str, - Result<(u16, Url, Option<&'static str>), String>, -); +pub type AiUaResult = (&'static str, Result); struct Out(Vec); @@ -321,7 +448,8 @@ fn file_value(p: &FileProbe) -> Value { "redirected": p.redirected, "contentType": p.content_type, "formatValid": p.format_valid, - "bytes": p.body.as_ref().map(String::len), + "bytes": p.size, + "truncated": p.truncated, }) } @@ -479,7 +607,7 @@ pub fn build(i: &Inputs) -> Vec { o.opt("meta.html_lang", Meta, "html lang", f.lang.as_deref()); match &f.canonical { Some(href) => { - let abs = base.join(href).ok(); + let abs = f.link_base(base).join(href).ok(); let same = abs.as_ref().is_some_and(|a| { a.as_str().trim_end_matches('/') == base.as_str().trim_end_matches('/') }); @@ -544,6 +672,7 @@ pub fn build(i: &Inputs) -> Vec { "canonical 호스트 불일치", f.canonical.as_deref(), base, + f.link_base(base), ); o.opt( "meta.google_site_verification", @@ -561,7 +690,7 @@ pub fn build(i: &Inputs) -> Vec { // ===== 색인 제어 ===== let robots_meta = f.meta("robots"); o.opt("indexing.meta_robots", Indexing, "meta robots", robots_meta); - let directives: Vec = [f.meta("robots"), f.meta("googlebot")] + let directives: Vec = [f.meta("robots"), f.meta("googlebot"), f.meta("bingbot")] .into_iter() .flatten() .flat_map(|v| v.split(',').map(|d| d.trim().to_ascii_lowercase())) @@ -637,6 +766,7 @@ pub fn build(i: &Inputs) -> Vec { "og:url 호스트 불일치", f.meta("og:url"), base, + f.link_base(base), ); for key in ["card", "title", "description", "image"] { o.opt( @@ -1085,7 +1215,7 @@ pub fn build(i: &Inputs) -> Vec { Ok(Robots::parse(i.robots.body.as_deref().unwrap_or_default())) } else if let Some(e) = &i.robots.error { Err(format!("robots.txt 요청 실패: {e}")) - } else if i.robots.status_code.is_some_and(|s| s >= 500) { + } else if i.robots.status_code.is_some_and(|s| s >= 500 || s == 429) { Err(format!( "robots.txt HTTP {}", i.robots.status_code.unwrap_or_default() @@ -1114,7 +1244,8 @@ pub fn build(i: &Inputs) -> Vec { None, ), } - let path = base.path(); + // robots 규칙은 경로 + 쿼리에 대해 판정한다 (RFC 9309) + let path = &base[url::Position::BeforePath..url::Position::AfterQuery]; let allow_check = |o: &mut Out, id: String, cat: Category, label: String, token: &str| { match &robots { Ok(r) => o.push( @@ -1128,28 +1259,74 @@ pub fn build(i: &Inputs) -> Vec { Err(e) => o.push(id, cat, label, Presence::Unknown, None, Some(e.clone())), } }; - let declared = &i.sitemap_detail.declared; + // robots.txt 가 선언한 sitemap 전체를 본다. 기본 경로와 같은 선언은 기본 경로 probe 결과를 쓰고, + // 요청 상한(5개)을 넘어 확인하지 못한 선언은 unchecked 로 남긴다. + let declared_raw: Vec = if i.robots.exists { + let origin = base.join("/").expect("origin"); + let mut v: Vec = Vec::new(); + for raw in Robots::parse(i.robots.body.as_deref().unwrap_or_default()).sitemaps { + if let Ok(u) = origin.join(&raw) + && !v.contains(&u) + { + v.push(u); + } + } + v + } else { + Vec::new() + }; + let entries: Vec<(&Url, Option<&FileProbe>)> = declared_raw + .iter() + .map(|u| { + let probe = if i.sitemap.url == u.as_str() { + Some(i.sitemap) + } else { + i.sitemap_detail + .declared + .iter() + .find(|p| p.url == u.as_str()) + }; + (u, probe) + }) + .collect(); + let checked: Vec<&FileProbe> = entries.iter().filter_map(|(_, p)| *p).collect(); + let unchecked = entries.len() - checked.len(); + let presence = if entries.is_empty() { + Presence::NotApplicable + } else if checked.iter().any(|p| p.error.is_none() && !p.exists) { + Presence::Missing + } else if unchecked > 0 || checked.iter().any(|p| p.error.is_some()) { + Presence::Unknown + } else { + Presence::Present + }; o.push( "crawling.robots_declared_sitemaps", Crawling, "robots.txt 선언 sitemap 접근", - if declared.is_empty() { - Presence::NotApplicable - } else { - Presence::from_bool(declared.iter().all(|p| p.exists)) - }, - (!declared.is_empty()).then(|| { + presence, + (!entries.is_empty()).then(|| { json!( - declared + entries .iter() - .map( - |p| json!({ "url": p.url, "statusCode": p.status_code, "exists": p.exists }) - ) + .map(|(u, p)| match p { + Some(p) => json!({ + "url": u.as_str(), + "statusCode": p.status_code, + "exists": p.exists, + "error": p.error, + }), + None => json!({ "url": u.as_str(), "checked": false }), + }) .collect::>() ) }), - (!declared.is_empty()) - .then(|| "기본 경로(/sitemap.xml)와 다른 선언만 별도 요청".to_string()), + (unchecked > 0).then(|| { + format!( + "선언 {}개 중 {unchecked}개는 요청 상한으로 확인하지 않음", + entries.len() + ) + }), ); o.push( "crawling.feed_link", @@ -1237,7 +1414,7 @@ pub fn build(i: &Inputs) -> Vec { o.push( "geo.tdm_reservation", Geo, - "TDM 예약 (tdmrep.json / 헤더 / 메타)", + "TDM 예약 선언 (tdmrep.json / 헤더 / 메타)", if wk.tdmrep.error.is_some() && tdm_header.is_none() && tdm_meta.is_none() { Presence::Unknown } else { @@ -1256,17 +1433,34 @@ pub fn build(i: &Inputs) -> Vec { ); } for (id, result) in i.ai_ua { - let label = format!("AI UA 응답 ({id})"); - match result { - Ok((status, final_url, challenge)) => o.push( + let search = SEARCH_USER_AGENTS.iter().any(|(s, _)| s == id); + let (item, cat, label) = if search { + ( + format!("crawling.ua_access.{id}"), + Crawling, + format!("검색 크롤러 UA 응답 ({id})"), + ) + } else { + ( format!("geo.ua_access.{id}"), Geo, + format!("AI UA 응답 ({id})"), + ) + }; + match result { + Ok((status, final_url, challenge, title)) => o.push( + item, + cat, label, Presence::from_bool((200..300).contains(status) && challenge.is_none()), - Some(json!({ "statusCode": status, "url": final_url.as_str(), "challenge": challenge })), + Some(json!({ + "statusCode": status, "url": final_url.as_str(), "challenge": challenge, "title": title, + // 일반 요청과 제목이 다르면 UA 별로 다른 내용을 주는 것(클로킹)일 수 있다 + "sameTitleAsPage": title.as_deref().map(str::trim) == i.facts.title.as_deref().map(str::trim), + })), Some("User-Agent 문자열만 바꾼 요청 결과. 크롤러 IP 검증을 하는 방화벽에서는 실제 크롤러와 결과가 다를 수 있음".into()), ), - Err(e) => o.push(format!("geo.ua_access.{id}"), Geo, label, Presence::Unknown, None, Some(format!("요청 실패: {e}"))), + Err(e) => o.push(item, cat, label, Presence::Unknown, None, Some(format!("요청 실패: {e}"))), } } let noai: Vec<&str> = ["noai", "noimageai"] @@ -1384,6 +1578,19 @@ pub fn build(i: &Inputs) -> Vec { extended_checks(&mut o, i, &robots); more_checks(&mut o, i, &robots); canonical_hreflang_weight_checks(&mut o, i); + deep_checks(&mut o, i); + rule_checks(&mut o, i); + agent_checks(&mut o, i); + owasp_checks(&mut o, i); + spec_checks(&mut o, i); + search_checks(&mut o, i, &robots); + search_network_checks(&mut o, i, &robots); + geo_spec_checks(&mut o, i, &robots); + security_spec_checks(&mut o, i); + google_spec_checks(&mut o, i, &robots); + aria_spec_checks(&mut o, i); + quality_spec_checks(&mut o, i); + final_spec_checks(&mut o, i); if let Some(site) = i.site { site_checks(&mut o, i, site); } @@ -1444,35 +1651,46 @@ pub fn build(i: &Inputs) -> Vec { } /// 카탈로그의 모든 id 를 카탈로그 순서로 담는다. 만들어지지 않은 항목(옵션으로 생략 등)은 unknown. -pub fn fill_catalog(mut checks: Vec) -> Vec { +pub fn fill_catalog(checks: Vec) -> Vec { use crate::catalog::{CATALOG, position}; - debug_assert!( - checks.iter().all(|c| position(&c.id).is_some()), - "카탈로그에 없는 id: {:?}", - checks - .iter() - .filter(|c| position(&c.id).is_none()) - .map(|c| &c.id) - .collect::>() - ); - for (id, category, label) in CATALOG { - if !checks.iter().any(|c| c.id == *id) { - checks.push(Check { + let mut slots: Vec> = vec![None; CATALOG.len()]; + for c in checks { + let pos = position(&c.id); + debug_assert!(pos.is_some(), "카탈로그에 없는 id: {}", c.id); + if let Some(pos) = pos { + slots[pos] = Some(c); + } + } + // 항목명·분류는 카탈로그가 기준이다 + CATALOG + .iter() + .zip(slots) + .map(|((id, category, label), c)| { + let mut c = c.unwrap_or_else(|| Check { id: (*id).to_string(), category: *category, - label: (*label).to_string(), + label: String::new(), presence: Presence::Unknown, value: None, note: Some("점검하지 않음 (옵션으로 생략했거나 수행 조건이 아님)".into()), }); - } - } - checks.sort_by_key(|c| position(&c.id).unwrap_or(usize::MAX)); - checks + c.category = *category; + c.label = (*label).to_string(); + c + }) + .collect() } -fn host_mismatch(o: &mut Out, id: &str, cat: Category, label: &str, raw: Option<&str>, base: &Url) { - let Some(u) = raw.and_then(|r| base.join(r).ok()) else { +fn host_mismatch( + o: &mut Out, + id: &str, + cat: Category, + label: &str, + raw: Option<&str>, + base: &Url, + link_base: &Url, +) { + let Some(u) = raw.and_then(|r| link_base.join(r).ok()) else { o.push(id, cat, label, Presence::NotApplicable, None, None); return; }; @@ -1557,6 +1775,34 @@ fn sitemap_checks(o: &mut Out, i: &Inputs, base: &Url) { ); let samples = &i.sitemap_detail.samples; if samples.is_empty() { + let note = i + .sitemap_detail + .sample_note + .clone() + .unwrap_or_else(|| "sitemap 에서 표본 URL 을 얻지 못함".into()); + for (id, label) in [ + ( + "crawling.sitemap_broken_urls", + "sitemap 샘플 URL 중 비정상 응답", + ), + ( + "crawling.sitemap_noindex_pages", + "sitemap 표본 중 noindex 페이지", + ), + ( + "crawling.sitemap_canonical_mismatch", + "sitemap 표본 중 canonical 이 다른 URL 인 페이지", + ), + ] { + o.push( + id, + Crawling, + label, + Presence::Unknown, + None, + Some(note.clone()), + ); + } return; } let broken: Vec = samples @@ -1574,13 +1820,15 @@ fn sitemap_checks(o: &mut Out, i: &Inputs, base: &Url) { Presence::from_bool(!broken.is_empty()), Some(json!({ "sampled": samples.len(), "broken": broken })), Some(format!( - "{}개 URL 표본 요청 (리다이렉트 추적 후 2xx 가 아닌 것)", - samples.len() + "{}개 URL 표본 요청{} (리다이렉트 추적 후 2xx 가 아닌 것)", + samples.len(), + if s.is_index { + ", sitemap index 의 첫 하위 sitemap 에서" + } else { + "" + } )), ); - if s.is_index { - return; - } let pages: Vec<(&String, &SamplePage)> = samples .iter() .filter_map(|(u, r)| { @@ -1783,11 +2031,11 @@ fn extended_checks(o: &mut Out, i: &Inputs, robots: &Result) { StructuredData, "hreflang 자기 참조", if has_hreflang { - Presence::from_bool( - f.hreflang - .iter() - .any(|h| base.join(&h.href).is_ok_and(|u| same_url(&u, base))), - ) + Presence::from_bool(f.hreflang.iter().any(|h| { + f.link_base(base) + .join(&h.href) + .is_ok_and(|u| same_url(&u, base)) + })) } else { Presence::NotApplicable }, @@ -2187,7 +2435,7 @@ fn extended_checks(o: &mut Out, i: &Inputs, robots: &Result) { o.push( "accessibility.obsolete_elements", Accessibility, - "폐기된 표현 요소 (marquee·blink·font·center)", + "폐기된 HTML 요소 (marquee·font·center 등)", Presence::from_bool(a.obsolete_elements > 0), Some(json!(a.obsolete_elements)), None, @@ -2500,6 +2748,7 @@ fn more_checks(o: &mut Out, i: &Inputs, robots: &Result) { Some(json!({ "statusCode": status, "name": get("name"), "shortName": get("short_name"), "startUrl": get("start_url"), "display": get("display"), "iconSizes": sizes, + "members": json.as_ref().and_then(Value::as_object).map(|m| m.keys().collect::>()), })), json.is_none() .then(|| "JSON 으로 해석할 수 없음".to_string()), @@ -2752,6 +3001,170 @@ fn more_checks(o: &mut Out, i: &Inputs, robots: &Result) { Some(json!({ "url": sm.url, "bytes": size, "entries": entries })), None, ); + let sm_url = Url::parse(&sm.url).unwrap_or_else(|_| page.final_url.clone()); + let issues = sitemap::validate(sm.body.as_deref().unwrap_or_default(), &sm_url); + let problem = |v: &[String]| { + ( + Presence::from_bool(!v.is_empty()), + (!v.is_empty()).then(|| json!(v)), + ) + }; + for (id, label, (p, v)) in [ + ( + "crawling.sitemap_invalid_priority", + "sitemap priority 범위 밖", + problem(&issues.invalid_priority), + ), + ( + "crawling.sitemap_invalid_changefreq", + "sitemap changefreq 허용값 밖", + problem(&issues.invalid_changefreq), + ), + ( + "crawling.sitemap_invalid_lastmod", + "sitemap lastmod W3C Datetime 형식 오류", + problem(&issues.invalid_lastmod), + ), + ( + "crawling.sitemap_invalid_loc", + "sitemap loc 형식 오류", + problem(&issues.invalid_loc), + ), + ( + "crawling.sitemap_out_of_scope", + "sitemap 위치 밖 URL", + problem(&issues.out_of_scope), + ), + ] { + o.push( + id, + Crawling, + label, + p, + v, + Some("sitemaps.org 프로토콜".into()), + ); + } + let date_unix = |d: &str| { + let d = d.trim(); + crate::sec::rfc3339_to_unix(d).or_else(|| { + (d.len() == 10) + .then(|| crate::sec::rfc3339_to_unix(&format!("{d}T00:00:00Z"))) + .flatten() + }) + }; + let future: Vec<&String> = issues + .lastmods + .iter() + .filter(|d| date_unix(d).is_some_and(|t| t > i.extended.now + 86_400)) + .take(20) + .collect(); + o.push( + "crawling.sitemap_future_lastmod", + Crawling, + "sitemap 미래 lastmod", + Presence::from_bool(!future.is_empty()), + (!future.is_empty()).then(|| json!(future)), + None, + ); + o.push( + "crawling.sitemap_invalid_xml", + Crawling, + "sitemap 구조 오류 (루트·loc 없는 url·중첩 index)", + Presence::from_bool(!issues.structure_errors.is_empty()), + (!issues.structure_errors.is_empty()).then(|| json!(issues.structure_errors)), + None, + ); + let [img, video, news, xhtml] = issues.extensions; + o.push( + "crawling.sitemap_extensions", + Crawling, + "sitemap 확장 (image·video·news·hreflang)", + Presence::from_bool(img + video + news + xhtml > 0), + Some(json!({ "image": img, "video": video, "news": news, "hreflang": xhtml })), + None, + ); + o.push( + "crawling.sitemap_extension_errors", + Crawling, + "sitemap 확장 태그 오류", + if img + video + news > 0 { + Presence::from_bool(!issues.extension_errors.is_empty()) + } else { + Presence::NotApplicable + }, + (!issues.extension_errors.is_empty()).then(|| json!(issues.extension_errors)), + Some("Google 이미지·동영상·뉴스 sitemap 필수 태그·개수".into()), + ); + let stale: Vec<&String> = issues + .news_dates + .iter() + .filter(|d| date_unix(d).is_some_and(|t| t < i.extended.now - 2 * 86_400)) + .take(20) + .collect(); + o.push( + "crawling.sitemap_news_stale", + Crawling, + "news sitemap 의 2일 지난 기사", + if issues.news_dates.is_empty() { + Presence::NotApplicable + } else { + Presence::from_bool(!stale.is_empty()) + }, + (!stale.is_empty()).then(|| json!(stale)), + None, + ); + let blocked: Vec<&str> = match robots { + Ok(r) => ["Googlebot", "Yeti", "Bingbot"] + .into_iter() + .filter(|b| !r.is_allowed(b, sm_url.path())) + .collect(), + Err(_) => Vec::new(), + }; + o.push( + "crawling.sitemap_blocked_by_robots", + Crawling, + "robots.txt 가 sitemap 파일을 차단", + if robots.is_ok() { + Presence::from_bool(!blocked.is_empty()) + } else { + Presence::Unknown + }, + (!blocked.is_empty()).then(|| json!(blocked)), + None, + ); + o.push( + "crawling.sitemap_namespace", + Crawling, + "sitemap 네임스페이스", + Presence::from_bool(issues.namespace), + None, + Some("http://www.sitemaps.org/schemas/sitemap/0.9".into()), + ); + o.push( + "crawling.sitemap_unescaped_entities", + Crawling, + "sitemap 엔티티 미이스케이프 (&)", + Presence::from_bool(issues.unescaped_ampersands > 0), + Some(json!(issues.unescaped_ampersands)), + None, + ); + o.push( + "crawling.sitemap_encoding", + Crawling, + "sitemap UTF-8", + Presence::from_bool(sm.utf8), + None, + None, + ); + o.push( + "crawling.sitemap_over_10mb", + Crawling, + "sitemap 10MB 이상 (네이버 제출 한도)", + Presence::from_bool(size >= 10 * 1024 * 1024), + Some(json!({ "url": sm.url, "bytes": size })), + None, + ); } // ===== GEO 세부 ===== @@ -2993,214 +3406,7875 @@ fn site_checks(o: &mut Out, i: &Inputs, site: &SiteSample) { ); } -fn canonical_hreflang_weight_checks(o: &mut Out, i: &Inputs) { +/// 추가 접근성·성능 항목 (HTML 정적 분석 + 이미 받은 리소스 크기). +fn deep_checks(o: &mut Out, i: &Inputs) { use Category::*; - let ext = i.extended; - let base = &i.page.final_url; + let m = &i.facts.more; + let list = |v: &[String]| (!v.is_empty()).then(|| json!(v)); - // ===== canonical 대상 ===== - let (lbl_noindex, lbl_bad) = ( - "canonical 대상 페이지 noindex", - "canonical 대상이 2xx 아님 또는 다른 canonical", + // ===== CSR 셸 ===== + let text_len = i.facts.body_text_len; + o.push( + "content.csr_shell", + Content, + "CSR 셸 추정 (정적 HTML 본문이 거의 없음)", + Presence::from_bool(text_len < CSR_SHELL_TEXT_LEN && m.script_srcs > 0), + Some(json!({ "bodyTextLength": text_len, "scripts": m.script_srcs })), + Some(format!( + "본문 텍스트 {CSR_SHELL_TEXT_LEN}자 미만 + 외부 스크립트 기준. present 면 본문·접근성 항목이 브라우저 렌더링 결과와 다를 수 있음" + )), ); - match &ext.canonical_target { - None => { - o.push( - "meta.canonical_target_noindex", - Meta, - lbl_noindex, - Presence::NotApplicable, - None, - Some("canonical 없음 또는 자기 참조".into()), - ); - o.push( - "meta.canonical_target_mismatch", - Meta, - lbl_bad, - Presence::NotApplicable, - None, - None, - ); - } - Some(Err(e)) => { - o.push( - "meta.canonical_target_noindex", - Meta, - lbl_noindex, - Presence::Unknown, - None, - Some(format!("요청 실패: {e}")), - ); - o.push( - "meta.canonical_target_mismatch", - Meta, - lbl_bad, - Presence::Unknown, - None, - None, - ); - } - Some(Ok(t)) => { - let ok = (200..300).contains(&t.status); - let own = t.canonical.as_deref(); - let points_elsewhere = - own.is_some_and(|c| Url::parse(c).map_or(true, |cu| !same_url(&cu, &t.final_url))); - let value = json!({ "url": t.final_url.as_str(), "statusCode": t.status, "noindex": t.noindex, "canonical": own }); - o.push( - "meta.canonical_target_noindex", - Meta, - lbl_noindex, - Presence::from_bool(t.noindex), - Some(value.clone()), - None, - ); - o.push( - "meta.canonical_target_mismatch", - Meta, - lbl_bad, - Presence::from_bool(!ok || points_elsewhere), - Some(value), - None, - ); - } - } - // ===== hreflang 상호 참조 ===== - if ext.hreflang_targets.is_empty() { - o.push( - "structured_data.hreflang_reciprocal", - StructuredData, - "hreflang 상호 참조", - Presence::NotApplicable, - None, - None, - ); - } else { - let mut all = true; - let detail: Vec = ext - .hreflang_targets - .iter() - .map(|(lang, url, r)| match r { - Ok(p) => { - let back = p - .hreflang - .iter() - .any(|(_, h)| Url::parse(h).is_ok_and(|u| same_url(&u, base))); - all &= back && (200..300).contains(&p.status); - json!({ "lang": lang, "url": url, "statusCode": p.status, "linksBack": back }) - } - Err(e) => { + // ===== 접근성 ===== + o.push( + "accessibility.invalid_aria_role", + Accessibility, + "ARIA 명세에 없는 role", + count_presence(m.invalid_roles.len(), m.role_elements), + list(&m.invalid_roles), + None, + ); + o.push( + "accessibility.invalid_aria_attr", + Accessibility, + "ARIA 명세에 없는 aria-* 속성", + count_presence(m.invalid_aria_attrs.len(), m.aria_attr_count), + list(&m.invalid_aria_attrs), + None, + ); + o.push( + "accessibility.role_img_unnamed", + Accessibility, + "이름 없는 role=\"img\"", + count_presence(m.role_img_unnamed, m.role_img), + Some(json!({ "total": m.role_img, "unnamed": m.role_img_unnamed })), + None, + ); + o.push( + "accessibility.video_captions_missing", + Accessibility, + "자막 트랙 없는 video", + count_presence(m.videos_without_captions, m.videos), + Some(json!({ "total": m.videos, "missing": m.videos_without_captions })), + Some(" 기준, 소리 없는(muted) 영상 제외. 영상에 자막이 입혀진(open caption) 경우는 알 수 없음".into()), + ); + o.push( + "accessibility.area_alt_missing", + Accessibility, + "alt 없는 이미지맵 area", + count_presence(m.areas_without_alt, m.areas), + Some(json!({ "total": m.areas, "missing": m.areas_without_alt })), + None, + ); + o.push( + "accessibility.object_alt_missing", + Accessibility, + "대체 텍스트 없는 object/embed", + count_presence(m.objects_without_alt, m.objects), + Some(json!({ "total": m.objects, "missing": m.objects_without_alt })), + None, + ); + o.push( + "accessibility.element_lang_invalid", + Accessibility, + "본문 요소의 잘못된 lang 값", + count_presence(m.invalid_element_langs.len(), m.element_langs), + list(&m.invalid_element_langs), + None, + ); + o.push( + "accessibility.nested_interactive", + Accessibility, + "링크·버튼 안의 인터랙티브 요소", + count_presence(m.nested_interactive, m.interactive_containers), + Some(json!({ "containers": m.interactive_containers, "nested": m.nested_interactive })), + None, + ); + o.push( + "accessibility.list_structure_invalid", + Accessibility, + "잘못된 목록 구조 (ul/ol 밖 li 등)", + count_presence(m.list_violations, m.list_elements), + Some(json!(m.list_violations)), + None, + ); + o.push( + "accessibility.aria_hidden_root", + Accessibility, + "html/body 에 aria-hidden=\"true\"", + Presence::from_bool(m.aria_hidden_root), + None, + None, + ); + let refresh_delay = i + .facts + .meta_refresh + .as_deref() + .and_then(signals::refresh_delay); + o.push( + "accessibility.timed_refresh", + Accessibility, + "시간 제한 자동 새로고침 (meta refresh 지연)", + Presence::from_bool(refresh_delay.is_some_and(|d| d > 0.0)), + refresh_delay.map(|d| json!(d)), + None, + ); + o.push( + "accessibility.duplicate_accesskeys", + Accessibility, + "중복 accesskey", + count_presence(m.duplicate_accesskeys.len(), m.accesskeys), + list(&m.duplicate_accesskeys), + None, + ); + o.push( + "accessibility.presentation_focusable", + Accessibility, + "초점을 받는 요소의 role=presentation/none", + count_presence(m.presentation_focusable, m.presentation_roles), + Some(json!({ "total": m.presentation_roles, "focusable": m.presentation_focusable })), + None, + ); + + const GENERIC_TITLES: &[&str] = &[ + "untitled", + "untitled document", + "document", + "react app", + "vite app", + "vite + react", + "vite + react + ts", + "vite + vue", + "nuxt app", + "create next app", + "next.js", + "welcome", + "index", + "home", + "new tab", + "제목 없음", + "홈", + ]; + let title_generic = match i.facts.title.as_deref() { + Some(t) => Presence::from_bool(GENERIC_TITLES.contains(&t.trim().to_lowercase().as_str())), + None => Presence::NotApplicable, + }; + // ===== 접근성 (키보드·폼·표·랜드마크) ==== + o.push( + "accessibility.custom_control_unfocusable", + Accessibility, + "초점을 받을 수 없는 커스텀 컨트롤 (role=button 등에 tabindex 없음)", + count_presence(m.custom_controls_unfocusable, m.custom_controls), + Some(json!({ "total": m.custom_controls, "unfocusable": m.custom_controls_unfocusable })), + None, + ); + o.push( + "accessibility.custom_control_unnamed", + Accessibility, + "이름 없는 커스텀 컨트롤", + count_presence(m.custom_controls_unnamed, m.custom_controls), + Some(json!({ "total": m.custom_controls, "unnamed": m.custom_controls_unnamed })), + None, + ); + o.push( + "accessibility.click_without_keyboard", + Accessibility, + "키보드로 쓸 수 없는 onclick 요소 (div·span 등)", + Presence::from_bool(m.click_without_keyboard > 0), + Some(json!(m.click_without_keyboard)), + Some("HTML onclick 속성 기준. 스크립트로 붙인 이벤트는 알 수 없음".into()), + ); + o.push( + "accessibility.aria_required_attr_missing", + Accessibility, + "역할에 필요한 ARIA 속성 누락", + Presence::from_bool(!m.required_aria_missing.is_empty()), + list(&m.required_aria_missing), + None, + ); + o.push( + "accessibility.dialog_unnamed", + Accessibility, + "이름 없는 대화상자 (dialog)", + count_presence(m.dialogs_unnamed, m.dialogs), + Some(json!({ "total": m.dialogs, "unnamed": m.dialogs_unnamed })), + None, + ); + o.push( + "accessibility.fieldset_legend_missing", + Accessibility, + "legend 없는 fieldset", + count_presence(m.fieldsets_without_legend, m.fieldsets), + Some(json!({ "total": m.fieldsets, "missing": m.fieldsets_without_legend })), + None, + ); + o.push( + "accessibility.radio_group_ungrouped", + Accessibility, + "fieldset·radiogroup 으로 묶이지 않은 라디오 그룹", + count_presence(m.radio_groups_ungrouped.len(), m.radio_groups), + list(&m.radio_groups_ungrouped), + None, + ); + o.push( + "accessibility.autocomplete_invalid", + Accessibility, + "잘못된 autocomplete 값", + count_presence(m.autocomplete_invalid.len(), m.autocomplete_fields), + list(&m.autocomplete_invalid), + None, + ); + o.push( + "accessibility.empty_table_headers", + Accessibility, + "비어 있는 표 제목 셀 (th)", + count_presence(m.empty_table_headers, m.table_headers), + Some(json!({ "total": m.table_headers, "empty": m.empty_table_headers })), + None, + ); + o.push( + "accessibility.scope_invalid", + Accessibility, + "잘못된 scope 속성", + count_presence(m.scope_invalid, m.scope_attrs), + Some(json!({ "total": m.scope_attrs, "invalid": m.scope_invalid })), + Some("th 가 아닌 요소의 scope 또는 row·col·rowgroup·colgroup 이 아닌 값".into()), + ); + o.push( + "accessibility.multiple_main", + Accessibility, + "main 랜드마크 중복", + count_presence(usize::from(m.main_landmarks > 1), m.main_landmarks), + Some(json!(m.main_landmarks)), + None, + ); + o.push( + "accessibility.unnamed_repeated_landmarks", + Accessibility, + "이름 없이 반복되는 nav·aside 랜드마크", + Presence::from_bool(!m.unnamed_repeated_landmarks.is_empty()), + list(&m.unnamed_repeated_landmarks), + None, + ); + o.push( + "accessibility.redundant_alt", + Accessibility, + "중복 표현이 든 alt (\"이미지\", \"image of\" 등)", + count_presence(m.redundant_alts.len(), m.alt_texts), + list(&m.redundant_alts), + None, + ); + o.push( + "accessibility.empty_summary", + Accessibility, + "비어 있는 details summary", + count_presence(m.empty_summaries, m.summaries), + Some(json!({ "total": m.summaries, "empty": m.empty_summaries })), + None, + ); + o.push( + "accessibility.page_title_generic", + Accessibility, + "기본값 그대로인 페이지 제목 (\"React App\" 등)", + title_generic, + i.facts.title.as_deref().map(|t| json!(t)), + None, + ); + + // ===== 성능 ===== + o.push( + "performance.lcp_image_lazy", + Performance, + "첫 이미지(LCP 후보) 지연 로딩", + if m.body_images == 0 { + Presence::NotApplicable + } else { + Presence::from_bool(m.first_image_lazy) + }, + None, + Some("본문 첫 기준. 실제 LCP 요소는 렌더링해야 알 수 있음".into()), + ); + o.push( + "performance.fetchpriority_high", + Performance, + "fetchpriority=\"high\" 지정", + Presence::from_bool(m.fetchpriority_high > 0), + Some(json!(m.fetchpriority_high)), + None, + ); + o.push( + "performance.document_write", + Performance, + "인라인 스크립트의 document.write", + Presence::from_bool(m.document_write), + None, + None, + ); + let css_imports = i.facts.extra.inline_css.imports + + i.extended + .external_css + .as_ref() + .map_or(0, |c| c.facts.imports); + o.push( + "performance.css_import", + Performance, + "CSS @import", + Presence::from_bool(css_imports > 0), + Some(json!({ + "inline": i.facts.extra.inline_css.imports, + "external": i.extended.external_css.as_ref().map(|c| c.facts.imports), + })), + Some("HTML 안 +
    +"#; + fx.page = page("https://a.com/", html); + fx.page + .headers + .insert("cache-control", "no-store".parse().unwrap()); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.extended.page_weight = Some(PageWeight { + js_total: 2, + js_checked: 2, + images_checked: 3, + images_unknown: 1, + large_scripts: largest( + [("a.js".to_string(), 900_000), ("b.js".to_string(), 10)].into_iter(), + LARGE_SCRIPT_BYTES, + ), + large_images: largest( + [("x.png".into(), 600_000), ("y.png".into(), 700_000)].into_iter(), + LARGE_IMAGE_BYTES, + ), + ..Default::default() + }); + let c = fx.run(); + for id in [ + "accessibility.invalid_aria_role", + "accessibility.timed_refresh", + "performance.lcp_image_lazy", + "performance.document_write", + "performance.css_import", + "performance.inline_code_bytes", + "performance.bfcache_blocked", + "performance.large_scripts", + "performance.large_images", + ] { + assert_eq!(get(&c, id).presence, Presence::Present, "{id}"); + } + let imgs = get(&c, "performance.large_images").value.as_ref().unwrap(); + assert_eq!(imgs[0]["url"], "y.png", "큰 순"); + assert_eq!( + get(&c, "accessibility.video_captions_missing").presence, + Presence::NotApplicable + ); + assert_eq!( + get(&c, "performance.fetchpriority_high").presence, + Presence::Missing + ); + + // 이미지가 없는 페이지 + fx.facts = crate::html::extract("", &fx.page.final_url); + let c = fx.run(); + assert_eq!( + get(&c, "performance.lcp_image_lazy").presence, + Presence::NotApplicable + ); + assert_eq!(get(&c, "content.csr_shell").presence, Presence::Missing); + + // 본문 없이 번들 스크립트만 있는 CSR 셸 + fx.facts = crate::html::extract( + r#"
    "#, + &fx.page.final_url, + ); + let c = fx.run(); + assert_eq!(get(&c, "content.csr_shell").presence, Presence::Present); + } + + /// 헤더·메타 값이 있을 때만 실행되는 판정 경로. + #[test] + fn header_and_meta_dependent_values() { + let mut fx = Fx::failing(); + let dup_ids: String = (0..21) + .map(|i| format!(r#"

    "#)) + .collect(); + let html = format!( + r#" + +

    무엇인가요?

    x
    {dup_ids}"# + ); + fx.page = page("https://a.com/", &html); + fx.page + .headers + .insert("content-type", "text/html; charset=UTF-8".parse().unwrap()); + fx.page + .headers + .insert("vary", "User-Agent".parse().unwrap()); + fx.facts = crate::html::extract(&html, &fx.page.final_url); + let c = fx.run(); + assert_eq!(get(&c, "indexing.meta_noindex").presence, Presence::Present); + assert_eq!( + get(&c, "crawling.vary_user_agent").presence, + Presence::Present + ); + assert_eq!(get(&c, "geo.question_headings").presence, Presence::Present); + assert!( + get(&c, "accessibility.duplicate_ids").note.is_some(), + "20개 초과" + ); + assert_eq!( + get(&c, "transport.mixed_content").presence, + Presence::Present + ); + assert_eq!( + get(&c, "geo.tables").presence, + Presence::Missing, + "presentation 표 제외" + ); + assert!( + get(&c, "meta.charset") + .value + .as_ref() + .unwrap() + .to_string() + .contains("utf-8") + ); + } + + #[test] + fn keyboard_and_title_items() { + let mut fx = Fx::failing(); + let html = r#"React App +
    x
    "#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + let c = fx.run(); + for id in [ + "accessibility.custom_control_unfocusable", + "accessibility.page_title_generic", + "accessibility.multiple_main", + ] { + assert_eq!(get(&c, id).presence, Presence::Present, "{id}"); + } + assert_eq!( + get(&c, "accessibility.dialog_unnamed").presence, + Presence::NotApplicable + ); + fx.facts = crate::html::extract("", &fx.page.final_url); + let c = fx.run(); + assert_eq!( + get(&c, "accessibility.page_title_generic").presence, + Presence::NotApplicable + ); + assert_eq!( + get(&c, "accessibility.multiple_main").presence, + Presence::NotApplicable + ); + } + + #[test] + fn standard_rule_items() { + let mut fx = Fx::failing(); + let css = format!( + "@media (orientation: landscape) {{ body {{ transform: rotate(-90deg) }} }}{}", + " ".repeat(3000) + ); + let html = format!( + r#" + +
    본문
    "# + ); + fx.page = page("https://a.com/", &html); + fx.page + .headers + .insert("x-robots-tag", "googlebot: nosnippet".parse().unwrap()); + fx.page + .headers + .insert("cross-origin-opener-policy", "same-origin".parse().unwrap()); + fx.page + .headers + .insert("cross-origin-resource-policy", "same-site".parse().unwrap()); + fx.facts = crate::html::extract(&html, &fx.page.final_url); + fx.extended.page_weight = Some(PageWeight { + images_checked: 2, + large_gifs: vec![("a.gif".into(), 200_000)], + ..Default::default() + }); + let c = fx.run(); + for id in [ + "meta.doctype", + "accessibility.html_xml_lang_mismatch", + "accessibility.orientation_lock", + "indexing.snippet_controls", + "security.cross_origin_opener_policy", + "security.cross_origin_resource_policy", + "performance.unminified_css", + "performance.large_gifs", + ] { + assert_eq!(get(&c, id).presence, Presence::Present, "{id}"); + } + let s = get(&c, "indexing.snippet_controls") + .value + .as_ref() + .unwrap() + .to_string(); + assert!(s.contains("max-snippet:50") && s.contains("noarchive") && s.contains("nosnippet")); + assert!(!s.contains("\"index\"")); + + // lang 이 같은 언어, CSS 없음 + let html = r#""#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + let c = fx.run(); + assert_eq!( + get(&c, "accessibility.html_xml_lang_mismatch").presence, + Presence::Missing + ); + assert_eq!( + get(&c, "performance.unminified_css").presence, + Presence::NotApplicable + ); + assert_eq!( + get(&c, "indexing.snippet_controls").presence, + Presence::Present, + "헤더 nosnippet" + ); + assert_eq!( + get(&c, "accessibility.definition_list_invalid").presence, + Presence::NotApplicable + ); + assert_eq!( + get(&c, "accessibility.landmark_not_top_level").presence, + Presence::NotApplicable + ); + + // xml:lang 없음, dd 만 있음 + fx.page.headers.remove("x-robots-tag"); + fx.facts = crate::html::extract( + "
    x
    ", + &fx.page.final_url, + ); + let c = fx.run(); + assert_eq!( + get(&c, "accessibility.html_xml_lang_mismatch").presence, + Presence::NotApplicable + ); + assert_eq!( + get(&c, "accessibility.definition_list_invalid").presence, + Presence::Present + ); + assert_eq!( + get(&c, "indexing.snippet_controls").presence, + Presence::Missing + ); + } + + #[test] + fn agent_discovery_items() { + let mut fx = Fx::failing(); + // 요청 실패 + 알림 없음 → 판별 불가 + let c = fx.run(); + assert_eq!(get(&c, "geo.ard_manifest").presence, Presence::Unknown); + assert_eq!(get(&c, "geo.ai_catalog_legacy").presence, Presence::Missing); + assert_eq!( + get(&c, "geo.webmcp_forms").presence, + Presence::NotApplicable + ); + + // robots.txt Agentmap + fx.robots = found( + "https://a.com/robots.txt", + "User-agent: *\nAgentmap: https://a.com/ard.json\n", + ); + let c = fx.run(); + let v = get(&c, "geo.ard_manifest"); + assert_eq!(v.presence, Presence::Present); + assert!( + v.value + .as_ref() + .unwrap() + .to_string() + .contains("https://a.com/ard.json") + ); + + // Link 헤더 rel=ard, well-known 파일, ai-catalog, Trusted Types + fx.robots = found("https://a.com/robots.txt", "User-agent: *\n"); + fx.page.headers.insert( + "link", + r#"; rel=preload, ; rel="ard""# + .parse() + .unwrap(), + ); + fx.page.headers.insert( + "content-security-policy", + "require-trusted-types-for 'script'".parse().unwrap(), + ); + fx.well_known.ai_catalog = found("https://a.com/.well-known/ai-catalog.json", "{}"); + let html = r#"
    "#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + let c = fx.run(); + assert_eq!(get(&c, "geo.ard_manifest").presence, Presence::Present); + assert_eq!(get(&c, "geo.ai_catalog_legacy").presence, Presence::Present); + assert_eq!(get(&c, "geo.webmcp_forms").presence, Presence::Present); + assert_eq!( + get(&c, "security.trusted_types").presence, + Presence::Present + ); + + // 아무 알림도 없고 파일도 없음 + fx.page + .headers + .insert("link", "; rel=preload".parse().unwrap()); + fx.well_known.ard = found("https://a.com/.well-known/ard.json", "{}"); + fx.well_known.ard.exists = false; + let c = fx.run(); + assert_eq!(get(&c, "geo.ard_manifest").presence, Presence::Missing); + } + + #[test] + fn owasp_headers_security_txt_and_rich_results() { + let mut fx = Fx::failing(); + fx.page + .headers + .insert("x-dns-prefetch-control", "off".parse().unwrap()); + fx.page + .headers + .insert("x-aspnet-version", "4.0.30319".parse().unwrap()); + fx.page + .headers + .insert("x-nextjs-cache", "HIT".parse().unwrap()); + fx.well_known.security_txt = found( + "https://a.com/.well-known/security.txt", + "Contact: mailto:security@a.com\nExpires: 2030-01-01T00:00:00.000Z\n", + ); + let html = r#"고정폭취소"#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + let c = fx.run(); + assert_eq!( + get(&c, "security.x_dns_prefetch_control").presence, + Presence::Present + ); + assert_eq!( + get(&c, "security.x_permitted_cross_domain_policies").presence, + Presence::Missing + ); + let leak = get(&c, "security.info_disclosure_headers"); + assert_eq!(leak.presence, Presence::Present); + assert!( + leak.value + .as_ref() + .unwrap() + .to_string() + .contains("x-aspnet-version: 4.0.30319") + ); + assert_eq!( + get(&c, "transport.security_txt_fields").presence, + Presence::Present + ); + assert_eq!( + get(&c, "structured_data.required.event").presence, + Presence::Missing, + "location 없음" + ); + assert_eq!( + get(&c, "structured_data.required.recipe").presence, + Presence::Present + ); + assert_eq!( + get(&c, "structured_data.required.software_app").presence, + Presence::Present + ); + assert_eq!( + get(&c, "structured_data.required.video").presence, + Presence::NotApplicable + ); + assert_eq!( + get(&c, "accessibility.obsolete_elements").value, + Some(json!(2)) + ); + + // Expires 없는 security.txt, 노출 헤더 없음 + fx.page.headers.clear(); + fx.well_known.security_txt = found( + "https://a.com/.well-known/security.txt", + "Contact: mailto:a@a.com\n", + ); + let c = fx.run(); + assert_eq!( + get(&c, "transport.security_txt_fields").presence, + Presence::Missing + ); + assert_eq!( + get(&c, "security.info_disclosure_headers").presence, + Presence::Missing + ); + // security.txt 자체가 없음 + fx.well_known.security_txt = failed("s"); + let c = fx.run(); + assert_eq!( + get(&c, "transport.security_txt_fields").presence, + Presence::NotApplicable + ); + } + + #[test] + fn spec_items_wcag_og_twitter_manifest_schema_headers() { + let mut fx = Fx::failing(); + let html = r##" + + + + + +WWW +

    x

    +a"##; + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.page + .headers + .insert("x-xss-protection", "1; mode=block".parse().unwrap()); + fx.extended.manifest = Some(Ok(( + 200, + Some(json!({ + "id": "/", "scope": "/", "description": "앱", "screenshots": [{}, {}], "shortcuts": [{}], + "icons": [{"src": "a.png", "purpose": "any maskable"}], + "theme_color": "#fff", "background_color": "#000", "display": "standalone" + })), + ))); + let c = fx.run(); + let p = |id: &str| get(&c, id).presence; + assert_eq!(p("accessibility.viewport_fixed_width"), Presence::Present); + assert_eq!( + get(&c, "accessibility.viewport_fixed_width").value, + Some(json!("width=1024")) + ); + assert_eq!(p("accessibility.site_search"), Presence::Missing); + assert_eq!(p("accessibility.breadcrumb_nav"), Presence::Missing); + assert_eq!(p("accessibility.abbr_without_title"), Presence::Present); + assert_eq!(p("accessibility.onchange_navigation"), Presence::Present); + assert_eq!(p("accessibility.onfocus_navigation"), Presence::Present); + assert_eq!( + p("accessibility.video_audio_description_missing"), + Presence::Present + ); + assert_eq!( + p("accessibility.password_autocomplete_off"), + Presence::Present + ); + assert_eq!(p("accessibility.reduced_motion"), Presence::Missing); + assert_eq!(p("accessibility.justified_text"), Presence::Present); + assert_eq!(p("accessibility.obsolete_attributes"), Presence::Present); + assert_eq!(p("open_graph.image_type"), Presence::Present); + assert_eq!(p("open_graph.video"), Presence::Missing); + assert_eq!(p("open_graph.type_unknown"), Presence::Missing); + assert_eq!( + get(&c, "open_graph.type_properties").value, + Some(json!(["article:published_time", "article:tag"])) + ); + assert_eq!(p("twitter.image_alt"), Presence::Present); + assert_eq!(p("twitter.player"), Presence::Missing); + assert_eq!( + get(&c, "twitter.app").value, + Some(json!(["twitter:app:name:iphone"])) + ); + assert_eq!(p("twitter.card_unknown"), Presence::Present); + for id in [ + "meta.manifest_id", + "meta.manifest_scope", + "meta.manifest_description", + "meta.manifest_screenshots", + "meta.manifest_shortcuts", + "meta.manifest_maskable_icon", + "meta.manifest_colors", + "meta.manifest_display_valid", + ] { + assert_eq!(p(id), Presence::Present, "{id}"); + } + assert_eq!(get(&c, "meta.manifest_screenshots").value, Some(json!(2))); + assert!(get(&c, "meta.manifest_content").value.as_ref().unwrap()["members"].is_array()); + assert_eq!( + get(&c, "structured_data.unknown_types").value, + Some(json!(["https://schema.org/FakeThing", "Widget"])) + ); + assert_eq!( + get(&c, "security.deprecated_headers").value, + Some(json!(["x-xss-protection: 1; mode=block"])) + ); + + // 반대 상황: 대상 없음 / 정상 값 / 외부 CSS + let html = r#" + + + +
    x"#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.page.headers.clear(); + fx.extended.external_css = Some(ExternalCss { + total: 1, + checked: 1, + failed: 0, + bytes: 10, + facts: crate::css::analyze( + "a{animation-name:spin} @media (prefers-reduced-motion: reduce){a{animation:none}}", + ), + }); + fx.extended.manifest = Some(Ok(( + 200, + Some(json!({ + "id": "", "scope": null, "screenshots": [], "shortcuts": [{}], "icons": [{"purpose": "any"}], + "theme_color": "#fff", "background_color": 1, "display": "tabs" + })), + ))); + let c = fx.run(); + let p = |id: &str| get(&c, id).presence; + assert_eq!(p("accessibility.viewport_fixed_width"), Presence::Missing); + assert_eq!(p("accessibility.site_search"), Presence::Present); + assert_eq!(p("accessibility.breadcrumb_nav"), Presence::Present); + assert_eq!(p("accessibility.abbr_without_title"), Presence::Missing); + assert_eq!( + p("accessibility.password_autocomplete_off"), + Presence::Missing + ); + assert_eq!(p("accessibility.reduced_motion"), Presence::Present); + assert_eq!(p("open_graph.type_properties"), Presence::Present); + assert_eq!(p("twitter.card_unknown"), Presence::Missing); + assert_eq!(p("twitter.app"), Presence::Missing); + assert_eq!(p("structured_data.unknown_types"), Presence::Missing); + assert_eq!(p("security.deprecated_headers"), Presence::Missing); + for (id, want) in [ + ("meta.manifest_id", Presence::Missing), + ("meta.manifest_scope", Presence::Missing), + ("meta.manifest_description", Presence::Missing), + ("meta.manifest_screenshots", Presence::Missing), + ("meta.manifest_shortcuts", Presence::Present), + ("meta.manifest_maskable_icon", Presence::Missing), + ("meta.manifest_colors", Presence::Present), + ("meta.manifest_display_valid", Presence::Missing), + ] { + assert_eq!(p(id), want, "{id}"); + } + + // og:type website / 명세에 없는 값, 대상 없음, manifest 해석 불가·없음·실패 + let html = + r#""#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.extended.external_css = None; + fx.extended.manifest = Some(Ok((200, None))); + let c = fx.run(); + let p = |id: &str| get(&c, id).presence; + assert_eq!(p("open_graph.type_unknown"), Presence::Missing); + assert_eq!(p("open_graph.type_properties"), Presence::NotApplicable); + assert_eq!( + p("accessibility.viewport_fixed_width"), + Presence::NotApplicable + ); + assert_eq!( + p("accessibility.abbr_without_title"), + Presence::NotApplicable + ); + assert_eq!( + p("accessibility.video_audio_description_missing"), + Presence::NotApplicable + ); + assert_eq!(p("accessibility.onfocus_navigation"), Presence::Missing); + assert_eq!(p("accessibility.reduced_motion"), Presence::NotApplicable); + assert_eq!(p("twitter.card_unknown"), Presence::NotApplicable); + assert_eq!(p("structured_data.unknown_types"), Presence::NotApplicable); + assert_eq!(p("meta.manifest_id"), Presence::NotApplicable); + assert!(get(&c, "meta.manifest_id").note.is_some()); + let html = + r#""#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.extended.manifest = None; + let c = fx.run(); + assert_eq!( + get(&c, "open_graph.type_unknown").presence, + Presence::Present ); + assert_eq!( + get(&c, "open_graph.type_properties").presence, + Presence::NotApplicable + ); + assert_eq!( + get(&c, "meta.manifest_colors").presence, + Presence::NotApplicable + ); + fx.extended.manifest = Some(Err("timeout".into())); + let c = fx.run(); + assert_eq!(get(&c, "meta.manifest_colors").presence, Presence::Unknown); } - // ===== 외부 CSS / 폰트 ===== - let inline = &i.facts.extra.inline_css; - if let Some(c) = &ext.external_css { - o.push( - "performance.external_css", - Performance, - "외부 CSS 분석", - Presence::from_bool(c.total > 0), - Some(json!({ "total": c.total, "checked": c.checked, "failed": c.failed, "bytes": c.bytes })), - None, + #[test] + fn search_engine_guide_items() { + let mut fx = Fx::failing(); + let html = r##"서울 맛집 서울 맛집 + + + + +hqf +
    n

    s

    "##; + fx.page = page("https://m.my_site.github.io/", html); + fx.page + .headers + .insert("content-type", "text/html; charset=UTF-8".parse().unwrap()); + fx.page.headers.insert( + "x-robots-tag", + "bingbot: noarchive, otherbot: noindex".parse().unwrap(), + ); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.robots = found( + "https://a.com/robots.txt", + "User-agent: *\nDisallow: /\n\nUser-agent: __usage_ai-training\nDisallow: /\n", + ); + fx.not_found = Ok(( + 404, + r#""#.into(), + )); + let hops = |n: usize| { + (0..=n) + .map(|k| Hop { + url: format!("https://a.com/{k}"), + status: 301, + }) + .collect::>() + }; + fx.redirect_chain = Some(Ok(hops(6))); + let c = fx.run(); + let p = |id: &str| get(&c, id).presence; + for id in [ + "meta.canonical_relative", + "meta.favicon_relative_href", + "meta.charset_mismatch", + "meta.head_elements_in_body", + "meta.description_same_as_title", + "meta.repeated_terms", + "twitter.domain", + "indexing.naver_directives", + "indexing.bingbot_meta", + "geo.copilot_restrictions", + "geo.bing_ai_preferences", + "indexing.noindex_blocked_by_robots", + "content.fragment_route_links", + "content.pseudo_js_links", + "content.img_generic_filenames", + "content.parameter_heavy_links", + "crawling.script_cache_busting", + "crawling.robots_blocks_resources_yeti", + "crawling.robots_blocks_resources_bingbot", + "crawling.robots_blocks_favicon", + "structured_data.rdfa", + "structured_data.microformats", + "structured_data.naver.movie", + "transport.hostname_invalid", + "transport.hosting_subdomain", + "transport.redirect_hops_excess", + "not_found_page.third_party_calls", + "indexing.snippet_controls", + "meta.favicon_duplicate_rel", + ] { + assert_eq!(p(id), Presence::Present, "{id}"); + } + for id in [ + "meta.mobile_site_canonical", + "structured_data.required.person", + "structured_data.naver.video", + "open_graph.image_socialonly", + ] { + assert_eq!(p(id), Presence::Missing, "{id}"); + } + assert_eq!(p("structured_data.naver.recipe"), Presence::NotApplicable); + assert_eq!( + get(&c, "geo.copilot_restrictions").value, + Some(json!(["nocache", "noarchive"])) + ); + assert_eq!( + get(&c, "transport.hosting_subdomain").value, + Some(json!("github.io")) + ); + assert_eq!( + get(&c, "indexing.noindex_blocked_by_robots").value, + Some(json!(["Googlebot", "Bingbot", "Yeti"])) + ); + + // 반대 상황 + let html = r#"제목 + +a"#; + fx.page = page("https://m.a.com/", html); + fx.page.headers.clear(); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.robots = found("https://a.com/robots.txt", "User-agent: *\nAllow: /\n"); + fx.not_found = Ok((404, "

    없음

    ".into())); + fx.redirect_chain = Some(Ok(vec![ + Hop { + url: "https://a.com/".into(), + status: 301, + }, + Hop { + url: "https://a.com/x".into(), + status: 301, + }, + Hop { + url: "https://a.com/".into(), + status: 200, + }, + ])); + let c = fx.run(); + let p = |id: &str| get(&c, id).presence; + for id in [ + "meta.canonical_relative", + "meta.favicon_relative_href", + "meta.description_same_as_title", + "meta.repeated_terms", + "meta.head_elements_in_body", + "indexing.naver_directives", + "indexing.bingbot_meta", + "geo.copilot_restrictions", + "geo.bing_ai_preferences", + "content.fragment_route_links", + "content.pseudo_js_links", + "content.img_generic_filenames", + "content.parameter_heavy_links", + "crawling.script_cache_busting", + "crawling.robots_blocks_favicon", + "transport.hostname_invalid", + "transport.hosting_subdomain", + "not_found_page.third_party_calls", + ] { + assert_eq!(p(id), Presence::Missing, "{id}"); + } + for id in [ + "meta.favicon_duplicate_rel", + "meta.mobile_site_canonical", + "open_graph.image_socialonly", + "transport.redirect_hops_excess", + ] { + assert_eq!(p(id), Presence::Present, "{id}"); + } + for id in [ + "meta.charset_mismatch", + "indexing.noindex_blocked_by_robots", + "crawling.robots_blocks_resources_yeti", + "structured_data.naver.video", + ] { + assert_eq!(p(id), Presence::NotApplicable, "{id}"); + } + + // 대상 없음·요청 실패 + let html = r#""#; + fx.page = page("http://127.0.0.1/", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.robots = failed("https://a.com/robots.txt"); + fx.not_found = err(); + fx.redirect_chain = Some(err()); + let c = fx.run(); + let p = |id: &str| get(&c, id).presence; + for id in [ + "meta.canonical_relative", + "meta.favicon_relative_href", + "meta.favicon_duplicate_rel", + "meta.description_same_as_title", + "meta.repeated_terms", + "content.fragment_route_links", + "content.img_generic_filenames", + "transport.hostname_invalid", + "meta.mobile_site_canonical", + ] { + assert_eq!(p(id), Presence::NotApplicable, "{id}"); + } + for id in [ + "indexing.noindex_blocked_by_robots", + "crawling.robots_blocks_resources_bingbot", + "crawling.robots_blocks_favicon", + "transport.redirect_hops_excess", + "not_found_page.third_party_calls", + ] { + assert_eq!(p(id), Presence::Unknown, "{id}"); + } + fx.redirect_chain = None; + let c = fx.run(); + assert_eq!( + get(&c, "transport.redirect_hops_excess").presence, + Presence::NotApplicable + ); + fx.redirect_chain = Some(Ok(vec![Hop { + url: "https://a.com/".into(), + status: 200, + }])); + let c = fx.run(); + assert_eq!( + get(&c, "transport.redirect_hops_excess").presence, + Presence::NotApplicable ); } - let faces = inline.font_faces + ext.external_css.as_ref().map_or(0, |c| c.facts.font_faces); - let without = inline.font_faces_without_display - + ext - .external_css - .as_ref() - .map_or(0, |c| c.facts.font_faces_without_display); - o.push( - "performance.font_face_without_display", - Performance, - "font-display 없는 @font-face", - count_presence(without, faces), - Some(json!({ "fontFaces": faces, "withoutDisplay": without })), - None, - ); - // ===== 페이지 무게 ===== - if let Some(w) = &ext.page_weight { - o.push( - "performance.page_weight", - Performance, - "페이지 리소스 무게", - Presence::Present, - Some(json!({ - "htmlBytes": i.page.body_bytes, - "cssBytes": ext.external_css.as_ref().map(|c| c.bytes), - "js": { "total": w.js_total, "checked": w.js_checked, "bytes": w.js_bytes }, - "images": { "total": w.images_total, "checked": w.images_checked, "unknown": w.images_unknown, "bytes": w.image_bytes }, - })), - Some("HTML·CSS·JS 는 압축 해제 기준, 이미지는 Content-Length 기준. 표본 상한이 있어 checked < total 이면 일부만 합산".into()), + #[test] + fn search_network_items() { + let mut fx = Fx::failing(); + let p = |c: &[Check], id: &str| get(c, id).presence; + // 수행 안 함 / 요청 실패 + let c = fx.run(); + for id in [ + "crawling.feed_valid", + "crawling.feed_full_content", + "meta.bing_site_auth_file", + "not_found_page.redirects", + "crawling.indexnow_key_file", + "crawling.sitemap_redirected_urls", + ] { + assert_eq!(p(&c, id), Presence::NotApplicable, "{id}"); + } + assert_eq!(p(&c, "crawling.robots_encoding"), Presence::Unknown); + assert_eq!( + p(&c, "transport.redirect_chain_robots_blocked"), + Presence::Unknown + ); + fx.redirect_chain = None; + let c = fx.run(); + assert_eq!( + p(&c, "transport.redirect_chain_robots_blocked"), + Presence::NotApplicable + ); + fx.extended.search = SearchProbes { + llms_subpath: None, + agent_card: None, + robots_chain: None, + change_password: None, + gpc: None, + conditional: None, + asset_encodings: Vec::new(), + statement: None, + mobile_alternate: None, + cors: None, + http_first_hop: None, + apple_touch_image: None, + manifest_icon: None, + feed: Some(failed("https://a.com/feed")), + bing_site_auth: Some(failed("https://a.com/BingSiteAuth.xml")), + not_found_chain: Some(err()), + chain_robots: vec![("b.com".into(), failed("https://b.com/robots.txt"))], + indexnow: Some(( + "0123456789abcdef".into(), + Some(failed("https://a.com/k.txt")), + )), + }; + fx.redirect_chain = Some(Ok(vec![ + Hop { + url: "https://b.com/".into(), + status: 301, + }, + Hop { + url: "https://a.com/".into(), + status: 200, + }, + ])); + fx.robots = found("https://a.com/robots.txt", "User-agent: *\nAllow: /\n"); + let c = fx.run(); + for id in [ + "crawling.feed_items", + "meta.bing_site_auth_file", + "not_found_page.redirects", + "crawling.indexnow_key_file", + "transport.redirect_chain_robots_blocked", + ] { + assert_eq!(p(&c, id), Presence::Unknown, "{id}"); + } + assert_eq!( + p(&c, "crawling.robots_encoding"), + Presence::Missing, + "utf8 플래그 없음" + ); + + // 응답은 있지만 조건 불충족 + let mut feed = found("https://a.com/feed", "피드 아님"); + feed.size = Some(11 * 1024 * 1024); + let mut big = found( + "https://a.com/feed", + "https://a.com/1", + ); + big.size = Some(11 * 1024 * 1024); + fx.extended.search = SearchProbes { + llms_subpath: None, + agent_card: None, + robots_chain: None, + change_password: None, + gpc: None, + conditional: None, + asset_encodings: Vec::new(), + statement: None, + mobile_alternate: None, + cors: None, + http_first_hop: None, + apple_touch_image: None, + manifest_icon: None, + feed: Some(feed), + bing_site_auth: Some(found("https://a.com/BingSiteAuth.xml", "")), + not_found_chain: Some(Ok(vec![ + Hop { + url: "https://a.com/nope".into(), + status: 302, + }, + Hop { + url: "https://a.com/".into(), + status: 200, + }, + ])), + chain_robots: vec![( + "b.com".into(), + FileProbe { + status_code: Some(404), + ..Default::default() + }, + )], + indexnow: Some(( + "0123456789abcdef".into(), + Some(found("https://a.com/k.txt", "다른 키")), + )), + }; + fx.robots.utf8 = true; + fx.sitemap_detail.samples = vec![ + ("https://a.com/p/".into(), Ok(sample_page(200))), + ("https://a.com/old".into(), Ok(sample_page(200))), + ("https://a.com/x".into(), err()), + ]; + fx.redirect_chain = Some(Ok(vec![ + Hop { + url: "not a url".into(), + status: 301, + }, + Hop { + url: "https://b.com/".into(), + status: 301, + }, + Hop { + url: "https://a.com/".into(), + status: 200, + }, + ])); + let c = fx.run(); + assert_eq!(p(&c, "crawling.feed_valid"), Presence::Missing); + for id in [ + "crawling.feed_items", + "crawling.feed_oversize", + "crawling.feed_full_content", + ] { + assert_eq!(p(&c, id), Presence::NotApplicable, "{id}"); + } + for id in [ + "meta.bing_site_auth_file", + "crawling.indexnow_key_file", + "transport.redirect_chain_robots_blocked", + ] { + assert_eq!(p(&c, id), Presence::Missing, "{id}"); + } + assert_eq!(p(&c, "crawling.robots_encoding"), Presence::Present); + assert_eq!(p(&c, "not_found_page.redirects"), Presence::Present); + assert_eq!( + get(&c, "crawling.sitemap_redirected_urls").value, + Some(json!(["https://a.com/old"])) + ); + + fx.extended.search.feed = Some(big); + fx.extended.search.indexnow = Some(("zz".into(), None)); + fx.robots = FileProbe { + status_code: Some(404), + ..Default::default() + }; + let c = fx.run(); + assert_eq!(p(&c, "crawling.feed_oversize"), Presence::Present); + assert_eq!(p(&c, "crawling.feed_full_content"), Presence::Missing); + assert_eq!(p(&c, "crawling.feed_foreign_host"), Presence::Missing); + assert_eq!(p(&c, "crawling.indexnow_key_file"), Presence::Missing); + assert_eq!(p(&c, "crawling.robots_encoding"), Presence::NotApplicable); + fx.redirect_chain = Some(Ok(vec![Hop { + url: "https://a.com/".into(), + status: 200, + }])); + let c = fx.run(); + assert_eq!( + p(&c, "transport.redirect_chain_robots_blocked"), + Presence::NotApplicable ); } -} -/// 대상 페이지 HTML·응답 헤더와 무관한 항목 (차단 시에도 유효). -const PAGE_INDEPENDENT: &[&str] = &[ - "crawling.sitemap", - "crawling.robots_txt", - "crawling.robots_sitemap", - "crawling.robots_declared", - "crawling.robots_allows", - "crawling.robots_oversize", - "crawling.robots_crawl", - "crawling.robots_invalid", - "crawling.ads_txt", - "transport.https", - "transport.http_status", - "transport.http_to_https", - "transport.redirect", - "transport.temporary_redirect", - "transport.tls", - "transport.security_txt", - "transport.http2", - "transport.http3", - "transport.bot_challenge", - "transport.meta_refresh", - "transport.js_redirect", - "transport.client_redirect", - "geo.llms", - "geo.ai_txt", - "geo.robots_allows", - "geo.ua_access", - "geo.markdown_version", - "meta.favicon_ico_file", - "meta.apple_touch_icon_file", - "meta.apple_app_site_association", - "meta.assetlinks", - "site.", - "performance.response_time", - "performance.compression", -]; + #[test] + fn geo_and_protocol_spec_items() { + let mut fx = Fx::failing(); + let p = |c: &[Check], id: &str| get(c, id).presence; + // 요청 실패·대상 없음 + let c = fx.run(); + for (id, want) in [ + ("geo.llms_txt_link_format", Presence::NotApplicable), + ("geo.llms_txt_describedby", Presence::Missing), + ("geo.llms_txt_subpath", Presence::NotApplicable), + ("geo.content_signals", Presence::Unknown), + ("geo.content_usage", Presence::Unknown), + ("geo.rsl_license", Presence::Missing), + ("geo.tdm_policy", Presence::NotApplicable), + ("geo.tdm_reservation_invalid", Presence::NotApplicable), + ("geo.a2a_agent_card", Presence::NotApplicable), + ("crawling.robots_content_type", Presence::NotApplicable), + ("crawling.robots_orphan_rules", Presence::NotApplicable), + ("crawling.robots_unreachable", Presence::Present), + ("crawling.robots_redirect_hops", Presence::NotApplicable), + ("geo.quotations", Presence::Missing), + ] { + assert_eq!(p(&c, id), want, "{id}"); + } -/// 대상 페이지가 차단·오류일 때 `unknown` 으로 바꿔야 하는 항목인지. -pub fn depends_on_page(id: &str) -> bool { - !PAGE_INDEPENDENT.iter().any(|p| id.starts_with(p)) -} + // 모두 갖춘 경우 + let html = r#" +
    인용

    30% 증가

    "#; + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.page + .headers + .insert("content-usage", "train-ai=n".parse().unwrap()); + fx.page.headers.insert( + "link", + r#"; rel="license"; type="application/rsl+xml", ; rel=describedby, "#.parse().unwrap(), + ); + fx.page + .headers + .insert("tdm-reservation", "1".parse().unwrap()); + let mut robots = found( + "https://a.com/robots.txt", + "Disallow: /x\nUser-agent: *\nContent-Signal: ai-train=no\nContent-Usage: train-ai=n\nLicense: https://a.com/l.xml\nAllow: /\n", + ); + robots.content_type = Some("text/plain; charset=utf-8".into()); + fx.robots = robots; + fx.llms = found( + "https://a.com/llms.txt", + "# A\n### x\n## Docs\n- bad\n## Optional\n- [a](https://a.com)\n", + ); + fx.well_known.tdmrep = found( + "https://a.com/.well-known/tdmrep.json", + r#"[{"location": "/", "tdm-reservation": 1, "tdm-policy": "https://a.com/p.json"}]"#, + ); + fx.extended.search.llms_subpath = Some(found("https://a.com/docs/llms.txt", "# Docs")); + fx.extended.search.agent_card = Some(found( + "https://a.com/.well-known/agent-card.json", + r#"{"name":"a","description":"d","version":"1","capabilities":{},"skills":[],"supportedInterfaces":[], +"defaultInputModes":[],"defaultOutputModes":[]}"#, + )); + let hops = |n: usize| { + (0..=n) + .map(|k| Hop { + url: format!("https://a.com/{k}"), + status: 301, + }) + .collect::>() + }; + fx.extended.search.robots_chain = Some(Ok(hops(6))); + let c = fx.run(); + for id in [ + "geo.llms_txt_link_format", + "geo.llms_txt_extra_headings", + "geo.llms_txt_optional_section", + "geo.llms_txt_describedby", + "geo.llms_txt_subpath", + "geo.content_signals", + "geo.content_usage", + "geo.rsl_license", + "geo.tdm_policy", + "geo.a2a_agent_card", + "crawling.robots_content_type", + "crawling.robots_orphan_rules", + "crawling.robots_redirect_hops", + "geo.quotations", + "geo.statistics", + ] { + assert_eq!(p(&c, id), Presence::Present, "{id}"); + } + assert_eq!(p(&c, "geo.tdm_reservation_invalid"), Presence::Missing); + assert_eq!(p(&c, "crawling.robots_unreachable"), Presence::Missing); + assert_eq!( + get(&c, "geo.llms_txt_describedby").value, + Some(json!(["/llms.txt", "/docs/llms.txt"])) + ); -#[cfg(test)] -mod tests { - use super::*; + // 값 오류·불충족 + fx.facts = crate::html::extract("", &fx.page.final_url); + fx.page.headers.clear(); + fx.page + .headers + .insert("tdm-reservation", "yes".parse().unwrap()); + fx.robots = found("https://a.com/robots.txt", "User-agent: *\nAllow: /\n"); + fx.well_known.tdmrep = found( + "https://a.com/.well-known/tdmrep.json", + r#"[{"location": "/", "tdm-reservation": 2}]"#, + ); + fx.extended.search.llms_subpath = Some(failed("https://a.com/docs/llms.txt")); + fx.extended.search.agent_card = Some(found( + "https://a.com/.well-known/agent-card.json", + r#"{"name":"a"}"#, + )); + fx.extended.search.robots_chain = Some(err()); + let c = fx.run(); + for (id, want) in [ + ("geo.content_signals", Presence::Missing), + ("geo.content_usage", Presence::Missing), + ("geo.tdm_policy", Presence::Missing), + ("geo.tdm_reservation_invalid", Presence::Present), + ("geo.a2a_agent_card", Presence::Missing), + ("geo.llms_txt_subpath", Presence::Unknown), + ("crawling.robots_redirect_hops", Presence::Unknown), + ("crawling.robots_content_type", Presence::Missing), + ("crawling.robots_orphan_rules", Presence::Missing), + ] { + assert_eq!(p(&c, id), want, "{id}"); + } + assert_eq!( + get(&c, "geo.tdm_reservation_invalid").value, + Some(json!(["yes", "tdmrep.json"])) + ); + fx.extended.search.agent_card = Some(failed("https://a.com/.well-known/agent-card.json")); + fx.extended.search.robots_chain = Some(Ok(hops(1))); + fx.robots = FileProbe { + status_code: Some(503), + ..Default::default() + }; + let c = fx.run(); + assert_eq!(p(&c, "geo.a2a_agent_card"), Presence::Unknown); + assert_eq!(p(&c, "crawling.robots_redirect_hops"), Presence::Missing); + assert_eq!(p(&c, "crawling.robots_unreachable"), Presence::Present); + fx.extended.search.agent_card = Some(FileProbe { + status_code: Some(404), + ..Default::default() + }); + let c = fx.run(); + assert_eq!(p(&c, "geo.a2a_agent_card"), Presence::Missing); + } #[test] - fn civil_year() { - assert_eq!(year_of(0), 1970); - assert_eq!(year_of(1_798_675_200), 2026); // 2026-12-31 - assert_eq!(year_of(1_798_761_600), 2027); // 2027-01-01 + fn sitemap_protocol_items() { + let mut fx = Fx::failing(); + fx.sitemap = found( + "https://a.com/sitemap.xml", + "https://a.com/a?x=1&y=2\ + 2often어제/rel", + ); + fx.sitemap.utf8 = true; + let c = fx.run(); + for id in [ + "crawling.sitemap_namespace", + "crawling.sitemap_invalid_priority", + "crawling.sitemap_invalid_changefreq", + "crawling.sitemap_invalid_lastmod", + "crawling.sitemap_unescaped_entities", + "crawling.sitemap_invalid_loc", + "crawling.sitemap_encoding", + ] { + assert_eq!(get(&c, id).presence, Presence::Present, "{id}"); + } + assert_eq!( + get(&c, "crawling.sitemap_out_of_scope").presence, + Presence::Missing + ); + } + + #[test] + fn security_scanner_items() { + let mut fx = Fx::failing(); + let p = |c: &[Check], id: &str| get(c, id).presence; + let html = r##" + + + + + +
    "##; + fx.page = page("https://a.com/", html); + fx.page.bom = true; + fx.page.meta_charset_offset = Some(2000); + fx.facts = crate::html::extract(html, &fx.page.final_url); + let h = &mut fx.page.headers; + h.clear(); + h.insert("content-security-policy", "script-src 'self' 'unsafe-inline' https:; style-src 'unsafe-eval' 'unsafe-inline' http://x; script-src y".parse().unwrap()); + h.insert( + "x-frame-options", + "ALLOW-FROM https://b.com".parse().unwrap(), + ); + h.insert("x-content-type-options", "yes".parse().unwrap()); + h.insert("cross-origin-opener-policy", "bogus".parse().unwrap()); + h.insert("access-control-allow-origin", "*".parse().unwrap()); + h.insert("public-key-pins", "pin".parse().unwrap()); + h.insert("p3p", "CP=x".parse().unwrap()); + h.insert( + "strict-transport-security", + "max-age=60; preload".parse().unwrap(), + ); + h.append("set-cookie", "sessionid=1; SameSite=None".parse().unwrap()); + h.append("set-cookie", "__Secure-a=1".parse().unwrap()); + h.append("set-cookie", "bad name=1".parse().unwrap()); + h.insert( + "content-type", + "text/plain; charset=euc-kr".parse().unwrap(), + ); + h.insert( + "cache-control", + "max-age=60, no-store, bogus, s-maxage=x".parse().unwrap(), + ); + h.insert("x-runtime", "0.1".parse().unwrap()); + fx.content_encoding = Some(Ok(Some("br".into()))); + fx.redirect_chain = Some(Ok(vec![ + Hop { + url: "https://a.com/x".into(), + status: 301, + }, + Hop { + url: "http://a.com/y".into(), + status: 200, + }, + ])); + fx.http_version = Some(Ok((301, u("https://www.b.com/")))); + fx.extended.manifest = Some(Ok(( + 200, + Some( + json!({"name": "아주 아주 아주 긴 이름을 가진 웹 애플리케이션 서비스 이름", "start_url": "https://other.com/"}), + ), + ))); + fx.well_known.security_txt = found( + "http://a.com/.well-known/security.txt", + "Contact: http://a.com/c\nExpires: 2000-01-01T00:00:00Z\nCanonical: https://a.com/other.txt\n", + ); + fx.extended.now = 1_800_000_000; + fx.not_found = Ok((200, "soft".into())); + fx.extended.search.change_password = Some(Ok(vec![Hop { + url: "https://a.com/.well-known/change-password".into(), + status: 200, + }])); + fx.extended.search.gpc = Some(found( + "https://a.com/.well-known/gpc.json", + r#"{"gpc": false}"#, + )); + let c = fx.run(); + for id in [ + "security.csp_meta", + "security.csp_unsafe_inline", + "security.csp_unsafe_eval", + "security.csp_object_src_unrestricted", + "security.csp_unsafe_inline_style", + "security.csp_base_uri_unrestricted", + "security.csp_form_action_unrestricted", + "security.csp_broad_script_source", + "security.clickjacking_unprotected", + "security.csp_duplicate_directives", + "security.csp_insecure_scheme", + "security.x_frame_options_invalid", + "security.x_content_type_options_invalid", + "security.referrer_policy_unsafe", + "security.cross_origin_policy_invalid", + "security.cors_wildcard", + "security.hpkp", + "security.p3p", + "meta.x_ua_compatible", + "transport.hsts_max_age_short", + "transport.hsts_preload_ineligible", + "transport.https_to_http_redirect", + "security.cookie_samesite_invalid", + "security.session_cookie_flags", + "security.cookie_prefix_invalid", + "security.cookie_syntax_invalid", + "security.sri_invalid", + "security.protocol_relative_urls", + "meta.bom", + "meta.charset_not_utf8", + "meta.charset_late", + "meta.charset_duplicate", + "transport.content_type_invalid", + "content.button_type_missing", + "meta.viewport_invalid", + "meta.theme_color_invalid", + "performance.cache_control_conflict", + "performance.vary_accept_encoding_missing", + "meta.manifest_name_length", + "meta.manifest_start_url_scope", + "transport.security_txt_expired", + "transport.security_txt_invalid", + "transport.security_txt_canonical_mismatch", + "security.info_disclosure_headers", + ] { + assert_eq!(p(&c, id), Presence::Present, "{id}"); + } + for id in [ + "security.csp_default_src_missing", + "transport.hsts_invalid", + "meta.manifest_file_extension", + "transport.security_txt_signed", + "security.change_password_url", + "trust.gpc", + "security.csp_strict_dynamic_without_nonce", + ] { + assert_eq!(p(&c, id), Presence::Missing, "{id}"); + } + assert_eq!( + p(&c, "security.csp_report_only_only"), + Presence::NotApplicable + ); + + // 깨끗한 응답 + let html = r#""#; + fx.page = page("https://a.com/", html); + fx.page.meta_charset_offset = Some(40); + fx.facts = crate::html::extract(html, &fx.page.final_url); + let h = &mut fx.page.headers; + h.clear(); + h.insert( + "content-security-policy", + "default-src 'none'; script-src 'nonce-a' 'strict-dynamic'; style-src 'self'; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'self'".parse().unwrap(), + ); + h.insert("x-frame-options", "DENY".parse().unwrap()); + h.insert("x-content-type-options", "nosniff".parse().unwrap()); + h.insert( + "referrer-policy", + "no-referrer, strict-origin-when-cross-origin" + .parse() + .unwrap(), + ); + h.insert( + "strict-transport-security", + "max-age=63072000; includeSubDomains; preload" + .parse() + .unwrap(), + ); + h.insert( + "set-cookie", + "__Host-s=1; Secure; HttpOnly; Path=/; SameSite=Lax" + .parse() + .unwrap(), + ); + h.insert("content-type", "text/html; charset=utf-8".parse().unwrap()); + h.insert("cache-control", "public, max-age=60".parse().unwrap()); + h.insert("vary", "Accept-Encoding".parse().unwrap()); + fx.redirect_chain = Some(Ok(vec![Hop { + url: "https://a.com/".into(), + status: 200, + }])); + fx.http_version = Some(Ok((301, u("https://a.com/")))); + fx.extended.manifest = Some(Ok(( + 200, + Some(json!({"name": "앱", "short_name": "앱", "start_url": "/app/", "scope": "/"})), + ))); + fx.well_known.security_txt = found( + "https://a.com/.well-known/security.txt", + "-----BEGIN PGP SIGNED MESSAGE-----\nContact: mailto:a@a.com\nExpires: 2030-01-01T00:00:00Z\nCanonical: https://a.com/.well-known/security.txt\n", + ); + fx.well_known.security_txt.content_type = Some("text/plain; charset=utf-8".into()); + fx.not_found = Ok((404, "none".into())); + fx.extended.search.change_password = Some(Ok(vec![Hop { + url: "x".into(), + status: 302, + }])); + fx.extended.search.gpc = Some(found( + "https://a.com/.well-known/gpc.json", + r#"{"gpc": true}"#, + )); + let c = fx.run(); + for id in [ + "security.csp_unsafe_inline", + "security.csp_unsafe_eval", + "security.csp_broad_script_source", + "security.csp_object_src_unrestricted", + "security.csp_unsafe_inline_style", + "security.csp_base_uri_unrestricted", + "security.csp_form_action_unrestricted", + "security.csp_default_src_missing", + "security.csp_insecure_scheme", + "security.clickjacking_unprotected", + "security.x_frame_options_invalid", + "security.x_content_type_options_invalid", + "security.referrer_policy_unsafe", + "transport.hsts_invalid", + "transport.hsts_max_age_short", + "transport.hsts_preload_ineligible", + "transport.https_to_http_redirect", + "security.cookie_samesite_invalid", + "security.session_cookie_flags", + "security.cookie_prefix_invalid", + "security.cookie_syntax_invalid", + "meta.charset_not_utf8", + "meta.charset_late", + "meta.charset_duplicate", + "transport.content_type_invalid", + "performance.cache_control_conflict", + "performance.vary_accept_encoding_missing", + "meta.manifest_name_length", + "meta.manifest_start_url_scope", + "transport.security_txt_expired", + "transport.security_txt_invalid", + "transport.security_txt_canonical_mismatch", + "security.cors_wildcard", + "security.protocol_relative_urls", + "security.csp_meta", + ] { + assert_eq!(p(&c, id), Presence::Missing, "{id}"); + } + for id in [ + "meta.viewport_invalid", + "meta.theme_color_invalid", + "security.sri_invalid", + "content.button_type_missing", + "security.cross_origin_policy_invalid", + ] { + assert_eq!(p(&c, id), Presence::NotApplicable, "{id}"); + } + for id in [ + "meta.manifest_file_extension", + "transport.security_txt_signed", + "security.change_password_url", + "trust.gpc", + ] { + assert_eq!(p(&c, id), Presence::Present, "{id}"); + } + + // 대상 없음·요청 실패·기타 분기 + let html = r#""#; + fx.page = page("http://a.com/", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.page.headers.clear(); + fx.page.headers.insert( + "content-security-policy-report-only", + "default-src 'self'".parse().unwrap(), + ); + fx.page.headers.insert( + "strict-transport-security", + "includeSubDomains".parse().unwrap(), + ); + fx.page + .headers + .insert("x-ua-compatible", "IE=edge".parse().unwrap()); + fx.redirect_chain = Some(err()); + fx.extended.manifest = Some(Ok(( + 200, + Some(json!({"start_url": "/x/", "scope": "/app/"})), + ))); + fx.extended.search.change_password = Some(err()); + fx.extended.search.gpc = Some(failed("g")); + fx.well_known.security_txt = failed("s"); + let c = fx.run(); + assert_eq!(p(&c, "security.csp_report_only_only"), Presence::Present); + assert_eq!(p(&c, "security.csp_unsafe_inline"), Presence::NotApplicable); + assert_eq!(p(&c, "transport.hsts_invalid"), Presence::Present); + assert_eq!( + p(&c, "transport.hsts_max_age_short"), + Presence::NotApplicable + ); + assert_eq!( + p(&c, "transport.https_to_http_redirect"), + Presence::NotApplicable + ); + assert_eq!(p(&c, "meta.charset_late"), Presence::NotApplicable); + assert_eq!(p(&c, "meta.manifest_start_url_scope"), Presence::Present); + assert_eq!(p(&c, "meta.manifest_name_length"), Presence::Present); + assert_eq!(p(&c, "meta.manifest_file_extension"), Presence::Missing); + assert_eq!(p(&c, "security.change_password_url"), Presence::Unknown); + assert_eq!(p(&c, "trust.gpc"), Presence::Unknown); + assert_eq!(p(&c, "meta.x_ua_compatible"), Presence::Present); + assert_eq!( + p(&c, "transport.security_txt_expired"), + Presence::NotApplicable + ); + fx.extended.manifest = Some(Ok((200, Some(json!({"name": "a"}))))); + fx.facts = crate::html::extract( + r#""#, + &fx.page.final_url, + ); + fx.extended.search.change_password = None; + fx.extended.search.gpc = None; + let c = fx.run(); + assert_eq!( + get(&c, "meta.manifest_start_url_scope").value, + Some(json!("start_url 없음")) + ); + assert_eq!( + p(&c, "security.change_password_url"), + Presence::NotApplicable + ); + assert_eq!(p(&c, "trust.gpc"), Presence::NotApplicable); + } + + #[test] + fn google_yandex_apple_items() { + let mut fx = Fx::failing(); + let p = |c: &[Check], id: &str| get(c, id).presence; + let html = r#"| 제목만 + + + + + + + +

    x

    숨김

    공백 +광고밑줄숨김 +

    English body text that is long enough to be latin

    "#; + fx.page = page("https://a.com/list?page=2", html); + fx.page.body_bytes = 3 * 1024 * 1024; + fx.facts = crate::html::extract(html, &fx.page.final_url); + let h = &mut fx.page.headers; + h.clear(); + h.insert("link", r#"; rel="canonical", ; rel="alternate"; hreflang="ja""#.parse().unwrap()); + h.append( + "x-robots-tag", + "applebot: nosnippet, yandex: noarchive".parse().unwrap(), + ); + fx.robots = found( + "https://a.com/robots.txt", + "User-agent: *\nDisallow: /f.png\nDisallow: /sitemap.xml\nNoindex: /x\nClean-param: ref\nAllow: notslash\n", + ); + fx.sitemap = found( + "https://a.com/sitemap.xml", + "https://a.com/2099-01-01\ + 2000-01-01", + ); + fx.extended.now = 1_800_000_000; + fx.extended.search.conditional = Some(Ok(304)); + fx.ai_ua = vec![("gptbot", Ok((200, u("https://other.com/"), None, None)))]; + fx.extended.favicon_image = Some(Ok(ImageInfo { + url: "https://a.com/f.png".into(), + status: 200, + content_type: Some("image/png".into()), + bytes: 10, + truncated: false, + width: Some(16), + height: Some(32), + })); + fx.extended.og_image = Some(Ok(ImageInfo { + url: "https://a.com/o.png".into(), + status: 200, + content_type: Some("image/png".into()), + bytes: 10, + truncated: false, + width: Some(600), + height: Some(300), + })); + fx.well_known.apple_app_site_association = + found("http://a.com/.well-known/apple-app-site-association", "{}"); + fx.well_known.apple_app_site_association.redirected = true; + let c = fx.run(); + for id in [ + "crawling.robots_rule_errors", + "crawling.robots_unsupported_directives", + "crawling.robots_clean_param", + "crawling.robots_blocks_favicon_googlebot", + "crawling.sitemap_future_lastmod", + "crawling.sitemap_invalid_xml", + "crawling.sitemap_extensions", + "crawling.sitemap_extension_errors", + "crawling.sitemap_news_stale", + "crawling.sitemap_blocked_by_robots", + "meta.canonical_header", + "meta.canonical_conflict", + "meta.canonical_fragment", + "structured_data.hreflang_invalid", + "structured_data.hreflang_other_sources", + "structured_data.hreflang_canonical_conflict", + "crawling.over_googlebot_size_limit", + "crawling.conditional_request_304", + "transport.ua_redirect_mismatch", + "indexing.robots_unknown_directives", + "indexing.unavailable_after_passed", + "indexing.robots_conflicting_directives", + "indexing.data_nosnippet_invalid_element", + "indexing.applebot_meta", + "indexing.yandex_meta", + "indexing.yandex_noindex_tag", + "indexing.google_meta", + "meta.rating", + "meta.yandex_site_verification", + "meta.title_half_empty", + "meta.title_script_mismatch", + "content.img_missing_src", + "content.img_unsupported_format", + "open_graph.image_under_1200", + "geo.future_dates", + "structured_data.website_duplicate", + "structured_data.site_name_mismatch", + "structured_data.is_accessible_for_free", + "content.hidden_text_styles", + "content.unencoded_link_urls", + "content.outbound_link_qualifiers", + "content.underscore_url_paths", + "crawling.rel_next_prev", + "meta.apple_app_site_association_valid", + "meta.apple_itunes_app_valid", + ] { + assert_eq!(p(&c, id), Presence::Present, "{id}"); + } + assert_eq!(p(&c, "meta.favicon_google_eligible"), Presence::Missing); + assert_eq!( + p(&c, "meta.paginated_canonical_to_first"), + Presence::Missing + ); + + // 깨끗한 페이지 + let html = r#"Clean title + + +

    English body

    "#; + fx.page = page("https://a.com/list?page=3&q=a", html); + fx.page.headers.clear(); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.robots = found("https://a.com/robots.txt", "User-agent: *\nAllow: /\n"); + fx.sitemap = found( + "https://a.com/sitemap.xml", + "https://a.com/2020-01-01", + ); + fx.extended.search.conditional = Some(Ok(200)); + fx.ai_ua = vec![("gptbot", Ok((200, u("https://a.com/"), None, None)))]; + fx.extended.favicon_image = Some(Ok(ImageInfo { + url: "x".into(), + status: 200, + content_type: Some("image/x-icon".into()), + bytes: 1, + truncated: false, + width: Some(48), + height: Some(48), + })); + fx.extended.og_image = Some(Ok(ImageInfo { + url: "x".into(), + status: 200, + content_type: None, + bytes: 1, + truncated: false, + width: Some(1200), + height: Some(630), + })); + fx.well_known.apple_app_site_association = found( + "https://a.com/.well-known/apple-app-site-association", + r#"{"applinks":{}}"#, + ); + let c = fx.run(); + for id in [ + "crawling.robots_rule_errors", + "crawling.robots_unsupported_directives", + "crawling.robots_blocks_favicon_googlebot", + "crawling.sitemap_future_lastmod", + "crawling.sitemap_invalid_xml", + "crawling.sitemap_extensions", + "crawling.sitemap_blocked_by_robots", + "meta.canonical_header", + "meta.canonical_fragment", + "structured_data.hreflang_invalid", + "structured_data.hreflang_canonical_conflict", + "crawling.conditional_request_304", + "transport.ua_redirect_mismatch", + "indexing.robots_unknown_directives", + "indexing.robots_conflicting_directives", + "meta.title_half_empty", + "meta.title_script_mismatch", + "open_graph.image_under_1200", + "structured_data.website_duplicate", + "structured_data.site_name_mismatch", + "meta.apple_app_site_association_valid", + "meta.apple_itunes_app_valid", + ] { + assert_eq!(p(&c, id), Presence::Missing, "{id}"); + } + assert_eq!(p(&c, "meta.favicon_google_eligible"), Presence::Present); + assert_eq!( + p(&c, "meta.paginated_canonical_to_first"), + Presence::Present + ); + for id in [ + "crawling.sitemap_extension_errors", + "crawling.sitemap_news_stale", + "meta.canonical_conflict", + "indexing.unavailable_after_passed", + "geo.future_dates", + "content.outbound_link_qualifiers", + ] { + assert_eq!(p(&c, id), Presence::NotApplicable, "{id}"); + } + + // 요청 실패·대상 없음 + fx.robots = failed("r"); + fx.extended.search.conditional = Some(err()); + fx.extended.favicon_image = Some(err()); + fx.ai_ua = vec![("gptbot", err())]; + let html = r#" +"#; + fx.page = page("https://a.com/x?page=1&q=a", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + let c = fx.run(); + assert_eq!(p(&c, "crawling.robots_rule_errors"), Presence::Unknown); + assert_eq!( + p(&c, "crawling.robots_blocks_favicon_googlebot"), + Presence::Unknown + ); + assert_eq!(p(&c, "crawling.conditional_request_304"), Presence::Unknown); + assert_eq!(p(&c, "meta.favicon_google_eligible"), Presence::Unknown); + assert_eq!( + p(&c, "indexing.unavailable_after_passed"), + Presence::Unknown + ); + assert_eq!( + p(&c, "transport.ua_redirect_mismatch"), + Presence::NotApplicable + ); + assert_eq!(p(&c, "meta.title_half_empty"), Presence::NotApplicable); + assert_eq!(p(&c, "geo.future_dates"), Presence::Present); + fx.robots = FileProbe { + status_code: Some(404), + ..Default::default() + }; + fx.extended.search.conditional = None; + fx.extended.favicon_image = None; + fx.well_known.apple_app_site_association = + found("https://a.com/.well-known/apple-app-site-association", "x"); + let c = fx.run(); + assert_eq!( + p(&c, "crawling.robots_rule_errors"), + Presence::NotApplicable + ); + assert_eq!( + p(&c, "crawling.conditional_request_304"), + Presence::NotApplicable + ); + assert_eq!( + p(&c, "meta.favicon_google_eligible"), + Presence::NotApplicable + ); + assert_eq!( + p(&c, "meta.apple_app_site_association_valid"), + Presence::Present + ); + } + + #[test] + fn aria_and_i18n_items() { + let mut fx = Fx::failing(); + let p = |c: &[Check], id: &str| get(c, id).presence; + let html = r##" + +skip접근성pdf

    ‮x

    "##; + fx.page = page("https://a.com/", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.extended.external_css = Some(ExternalCss { + facts: crate::css::analyze("b{text-decoration: blink}"), + ..Default::default() + }); + let c = fx.run(); + for id in [ + "accessibility.statement_link", + "accessibility.aria_role_redundant", + "accessibility.css_blink", + "accessibility.rtl_dir_missing", + "content.linked_documents", + "content.bidi_control_chars", + "structured_data.accessibility_metadata", + "meta.xml_declaration", + ] { + assert_eq!(p(&c, id), Presence::Present, "{id}"); + } + assert_eq!(get(&c, "accessibility.css_blink").value, Some(json!(2))); + let html = r#"

    x

    "#; + fx.page = page("https://a.com/", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.extended.external_css = None; + let c = fx.run(); + assert_eq!( + p(&c, "accessibility.rtl_dir_missing"), + Presence::NotApplicable + ); + assert_eq!( + p(&c, "accessibility.media_controls_missing"), + Presence::NotApplicable + ); + assert_eq!(p(&c, "meta.xml_declaration"), Presence::Missing); + assert_eq!(p(&c, "accessibility.statement_link"), Presence::Missing); + } + + #[test] + fn quality_and_asset_items() { + use crate::fetch::ResourceSample; + let mut fx = Fx::failing(); + let p = |c: &[Check], id: &str| get(c, id).presence; + let html = r#"

    x

    "#; + fx.page = page("https://a.com/", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.page + .headers + .insert("server-timing", "db;dur=5".parse().unwrap()); + fx.page + .headers + .insert("link", "; rel=preload; as=style".parse().unwrap()); + let ok = |ct: &str, body: &str, final_url: &str| { + Ok(ResourceSample { + status: 200, + final_url: final_url.into(), + content_type: Some(ct.into()), + bytes: body.len(), + body: body.as_bytes().to_vec(), + }) + }; + let pretty = format!( + "function a() {{\n{}}}\n", + " var x = 1;\n".repeat(400) + ); + fx.extended.page_weight = Some(PageWeight { + scripts: vec![ + ( + "https://a.com/a.js".into(), + ok("text/plain", &pretty, "https://a.com/a.js"), + ), + ( + "https://a.com/b.js".into(), + ok( + "text/javascript", + "regeneratorRuntime.mark()", + "https://cdn.a.com/b.js", + ), + ), + ( + "https://a.com/c.js".into(), + Ok(ResourceSample { + status: 404, + ..Default::default() + }), + ), + ("https://a.com/d.js".into(), Err("boom".into())), + ], + ..Default::default() + }); + fx.extended.search.asset_encodings = vec![ + ("https://a.com/a.css".into(), Ok((200, None))), + ("https://a.com/b.css".into(), Ok((200, Some("br".into())))), + ("https://a.com/c.css".into(), Err("boom".into())), + ]; + let c = fx.run(); + for id in [ + "meta.http_equiv_invalid", + "performance.legacy_font_formats", + "performance.content_visibility", + "performance.layout_animations", + "performance.css_prefix_order", + "accessibility.summary_display_changed", + "performance.server_timing", + "performance.link_header_preload", + "performance.asset_compression", + "transport.asset_content_type_mismatch", + "content.broken_resources", + "performance.asset_redirects", + "performance.unminified_js", + "performance.legacy_javascript", + ] { + assert_eq!(p(&c, id), Presence::Present, "{id}"); + } + fx.extended.page_weight = None; + fx.extended.search.asset_encodings = Vec::new(); + let html = ""; + fx.page = page("https://a.com/", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + let c = fx.run(); + for id in [ + "meta.http_equiv_invalid", + "performance.asset_compression", + "transport.asset_content_type_mismatch", + "content.broken_resources", + "performance.unminified_js", + "performance.legacy_font_formats", + "performance.iframe_lazy", + "content.time_datetime_invalid", + "structured_data.microdata_invalid", + ] { + assert_eq!(p(&c, id), Presence::NotApplicable, "{id}"); + } + assert_eq!(p(&c, "performance.link_header_preload"), Presence::Missing); + } + + #[test] + fn final_items_branches() { + let mut fx = Fx::failing(); + let p = |c: &[Check], id: &str| get(c, id).presence; + let html = r#"데스크톱 +
    a
    a
    "#; + fx.page = page("https://a.com/", html); + fx.facts = crate::html::extract(html, &fx.page.final_url); + fx.ai_ua = vec![( + "googlebot_smartphone", + Ok((200, u("https://a.com/"), None, Some("모바일".into()))), + )]; + let s = &mut fx.extended.search; + s.statement = Some(("https://a.com/acc".into(), Err("boom".into()))); + let mut mobile = sample_page(200); + mobile.title = None; + s.mobile_alternate = Some(("https://m.a.com/".into(), Ok(mobile))); + s.cors = Some(Ok((Some(CORS_PROBE_ORIGIN.into()), true))); + s.http_first_hop = Some(Ok((301, Some("http://www.a.com/".into()), true))); + s.apple_touch_image = Some(Err("boom".into())); + s.manifest_icon = Some(("512x512".into(), Err("boom".into()))); + let mut hm = HeaderMap::new(); + hm.insert("x-ua-compatible", "IE=edge".parse().unwrap()); + fx.extended.static_asset = Some(("https://a.com/a.css".into(), Ok((200, hm)))); + let c = fx.run(); + for id in [ + "crawling.dynamic_serving_without_vary", + "meta.mobile_alternate_mismatch", + "security.cors_reflects_origin_credentials", + "transport.http_redirect_not_https_first", + "transport.http_redirect_off_host", + "transport.hsts_over_http", + "performance.html_only_headers", + "accessibility.definition_list_duplicate_terms", + ] { + assert_eq!(p(&c, id), Presence::Present, "{id}"); + } + for id in [ + "accessibility.statement_feedback", + "meta.apple_touch_icon_spec", + "meta.manifest_icon_size_mismatch", + ] { + assert_eq!(p(&c, id), Presence::Unknown, "{id}"); + } + assert_eq!(p(&c, "security.vulnerable_js_libraries"), Presence::Missing); + + let s = &mut fx.extended.search; + s.statement = None; + s.mobile_alternate = Some(("https://m.a.com/".into(), Err("boom".into()))); + s.cors = Some(Err("boom".into())); + s.http_first_hop = Some(Err("boom".into())); + s.apple_touch_image = None; + s.manifest_icon = None; + fx.extended.static_asset = Some(("https://a.com/a.css".into(), Err("boom".into()))); + fx.ai_ua = vec![("googlebot_smartphone", Err("boom".into()))]; + let c = fx.run(); + for id in [ + "meta.mobile_alternate_mismatch", + "security.cors_reflects_origin_credentials", + "transport.http_redirect_off_host", + "transport.hsts_over_http", + "performance.html_only_headers", + "crawling.dynamic_serving_without_vary", + ] { + assert_eq!(p(&c, id), Presence::Unknown, "{id}"); + } + fx.extended.search.mobile_alternate = None; + fx.extended.search.cors = None; + fx.extended.search.http_first_hop = Some(Ok((200, None, false))); + fx.extended.static_asset = None; + fx.ai_ua = Vec::new(); + let c = fx.run(); + for id in [ + "meta.mobile_alternate_mismatch", + "security.cors_reflects_origin_credentials", + "transport.http_redirect_not_https_first", + "performance.html_only_headers", + "crawling.dynamic_serving_without_vary", + "accessibility.statement_feedback", + ] { + assert_eq!(p(&c, id), Presence::NotApplicable, "{id}"); + } + assert_eq!(p(&c, "transport.hsts_over_http"), Presence::Missing); + fx.extended.search.http_first_hop = None; + let c = fx.run(); + assert_eq!( + p(&c, "transport.http_redirect_off_host"), + Presence::NotApplicable + ); } } diff --git a/crates/devup-access-checker/src/css.rs b/crates/devup-access-checker/src/css.rs index aa76110..7972599 100644 --- a/crates/devup-access-checker/src/css.rs +++ b/crates/devup-access-checker/src/css.rs @@ -9,6 +9,74 @@ static OUTLINE_NONE: LazyLock = LazyLock::new(|| { }); static FONT_FACE: LazyLock = LazyLock::new(|| Regex::new(r"(?is)@font-face\s*\{([^}]*)\}").unwrap()); +static IMPORT: LazyLock = LazyLock::new(|| Regex::new(r"(?i)@import\s").unwrap()); +static WHITESPACE: LazyLock = LazyLock::new(|| Regex::new(r"\s+").unwrap()); +static ORIENTATION_LOCK: LazyLock = LazyLock::new(|| { + Regex::new(r"(?is)@media[^{]*orientation\s*:\s*(?:portrait|landscape)[^{]*\{[^@]*?rotate\(\s*-?(?:90|270)deg").unwrap() +}); +static MOTION: LazyLock = LazyLock::new(|| { + Regex::new(r"(?i)(?:^|[;{\s])(?:animation|transition)(?:-name|-duration)?\s*:\s*([^;}]*)") + .unwrap() +}); +static JUSTIFY: LazyLock = + LazyLock::new(|| Regex::new(r"(?i)text-align\s*:\s*justify").unwrap()); +static CONTENT_VISIBILITY: LazyLock = + LazyLock::new(|| Regex::new(r"(?i)content-visibility\s*:\s*auto").unwrap()); +static BLOCK: LazyLock = LazyLock::new(|| Regex::new(r"\{([^{}]*)\}").unwrap()); +static SUMMARY: LazyLock = LazyLock::new(|| { + Regex::new(r"(?is)(?:^|[},\s])summary\s*(?:,[^{]*)?\{[^}]*?display\s*:\s*([a-z-]+)").unwrap() +}); +static KEYFRAMES: LazyLock = + LazyLock::new(|| Regex::new(r"(?i)@(?:-webkit-|-moz-)?keyframes\b[^{]*\{").unwrap()); +static LAYOUT_PROP: LazyLock = LazyLock::new(|| { + Regex::new(r"(?i)(?:^|[;{\s])(?:width|height|top|left|right|bottom|margin(?:-[a-z]+)?|padding(?:-[a-z]+)?|font-size|border-width)\s*:").unwrap() +}); + +/// 레이아웃·페인트를 다시 하게 만드는 속성을 움직이는 @keyframes 수 (webhint detect-css-reflows). +fn layout_keyframes(css: &str) -> usize { + KEYFRAMES + .find_iter(css) + .filter(|m| { + // 여는 중괄호부터 짝이 맞는 닫는 중괄호까지 + let mut depth = 1usize; + let rest = &css[m.end()..]; + let end = rest + .char_indices() + .find(|(_, c)| { + match c { + '{' => depth += 1, + '}' => depth -= 1, + _ => {} + } + depth == 0 + }) + .map_or(rest.len(), |(i, _)| i); + LAYOUT_PROP.is_match(&rest[..end]) + }) + .count() +} + +/// 선언 블록 하나에서 접두사 없는 속성 뒤에 같은 속성의 접두사 버전이 오는 수. +fn prefix_after_standard(block: &str) -> usize { + let props: Vec = block + .split(';') + .filter_map(|d| { + d.split_once(':') + .map(|(p, _)| p.trim().to_ascii_lowercase()) + }) + .collect(); + props + .iter() + .enumerate() + .filter(|(i, p)| { + ["-webkit-", "-moz-", "-ms-", "-o-"].iter().any(|x| { + p.strip_prefix(x) + .is_some_and(|std| props[..*i].iter().any(|q| q == std)) + }) + }) + .count() +} + static COMMENT: LazyLock = LazyLock::new(|| Regex::new(r"(?s)/\*.*?\*/").unwrap()); #[derive(Debug, Clone, Default, PartialEq, Eq)] @@ -19,6 +87,32 @@ pub struct CssFacts { pub font_faces: usize, /// font-display 가 없는 @font-face 수 pub font_faces_without_display: usize, + /// `@import` 규칙 수 (스타일시트를 직렬로 더 받게 한다) + pub imports: usize, + /// 화면 방향 미디어 쿼리 안에서 90도 회전시키는 규칙 (방향 고정) + pub orientation_lock: usize, + /// 분석한 CSS 바이트 + pub bytes: usize, + /// 주석·불필요한 공백을 지우면 줄어드는 바이트 (압축 안 된 CSS 추정) + pub minifiable_bytes: usize, + /// 움직임을 만드는 animation·transition 선언 수 (none·0s 제외) + pub animations: usize, + /// `prefers-reduced-motion` 미디어 쿼리 사용 + pub reduced_motion: bool, + /// `text-align: justify` 선언 수 + pub justify: usize, + /// `text-decoration: blink` 선언 수 + pub blink: usize, + /// WOFF2 없이 ttf·otf·eot·svg 만 쓰는 @font-face 수 + pub legacy_fonts: usize, + /// `content-visibility: auto` 선언 수 + pub content_visibility: usize, + /// 레이아웃·페인트 속성을 움직이는 @keyframes 수 + pub layout_keyframes: usize, + /// 접두사 없는 속성 뒤에 온 접두사 속성 수 (webhint css-prefix-order) + pub prefix_after_standard: usize, + /// summary 의 display 를 list-item 외로 바꾼 규칙 수 + pub summary_display: usize, } impl CssFacts { @@ -27,17 +121,61 @@ impl CssFacts { self.has_focus_visible |= other.has_focus_visible; self.font_faces += other.font_faces; self.font_faces_without_display += other.font_faces_without_display; + self.imports += other.imports; + self.orientation_lock += other.orientation_lock; + self.bytes += other.bytes; + self.minifiable_bytes += other.minifiable_bytes; + self.animations += other.animations; + self.reduced_motion |= other.reduced_motion; + self.justify += other.justify; + self.blink += other.blink; + self.legacy_fonts += other.legacy_fonts; + self.content_visibility += other.content_visibility; + self.layout_keyframes += other.layout_keyframes; + self.prefix_after_standard += other.prefix_after_standard; + self.summary_display += other.summary_display; } } pub fn analyze(css: &str) -> CssFacts { + let original = css.len(); let css = COMMENT.replace_all(css, ""); + let collapsed = WHITESPACE.replace_all(&css, " ").len(); let mut f = CssFacts { outline_removed: OUTLINE_NONE.find_iter(&css).count(), has_focus_visible: css.contains(":focus-visible"), + imports: IMPORT.find_iter(&css).count(), + orientation_lock: ORIENTATION_LOCK.find_iter(&css).count(), + bytes: original, + minifiable_bytes: original - collapsed, + animations: MOTION + .captures_iter(&css) + .filter(|c| !matches!(c[1].trim(), "none" | "0s" | "0" | "all 0s")) + .count(), + reduced_motion: css.to_ascii_lowercase().contains("prefers-reduced-motion"), + justify: JUSTIFY.find_iter(&css).count(), + blink: crate::aria::css_blink(&css), + content_visibility: CONTENT_VISIBILITY.find_iter(&css).count(), + layout_keyframes: layout_keyframes(&css), + prefix_after_standard: BLOCK + .captures_iter(&css) + .map(|c| prefix_after_standard(&c[1])) + .sum(), + summary_display: SUMMARY + .captures_iter(&css) + .filter(|c| !c[1].eq_ignore_ascii_case("list-item")) + .count(), ..Default::default() }; for c in FONT_FACE.captures_iter(&css) { + let body = c[1].to_ascii_lowercase(); + if !body.contains("woff2") + && [".ttf", ".otf", ".eot", ".svg", "truetype", "opentype"] + .iter() + .any(|x| body.contains(x)) + { + f.legacy_fonts += 1; + } f.font_faces += 1; if !c[1].to_ascii_lowercase().contains("font-display") { f.font_faces_without_display += 1; @@ -53,7 +191,7 @@ mod tests { #[test] fn analyzes_css() { let f = analyze( - "/* outline:none; */ a:focus{outline:none} b{outline: 0 !important;} c{outline:1px solid}\ + "@import url(a.css); /* @import x; */ /* outline:none; */ a:focus{outline:none} b{outline: 0 !important;} c{outline:1px solid}\ .x:focus-visible{} @font-face{font-family:A;src:url(a.woff2)} @font-face{font-family:B;font-display:swap}", ); assert_eq!( @@ -62,8 +200,70 @@ mod tests { outline_removed: 2, has_focus_visible: true, font_faces: 2, - font_faces_without_display: 1 + font_faces_without_display: 1, + imports: 1, + orientation_lock: 0, + bytes: f.bytes, + minifiable_bytes: f.minifiable_bytes, + animations: 0, + reduced_motion: false, + justify: 0, + blink: 0, + legacy_fonts: 0, + content_visibility: 0, + layout_keyframes: 0, + prefix_after_standard: 0, + summary_display: 0, } ); } + + #[test] + fn orientation_lock_and_minify_estimate() { + let f = analyze( + "@media (orientation: portrait) { + body { transform: rotate(90deg); } +} +/* 설명 */ +", + ); + assert_eq!(f.orientation_lock, 1); + assert!(f.minifiable_bytes > 10 && f.bytes > f.minifiable_bytes); + assert_eq!(analyze("a{b:c}").minifiable_bytes, 0); + } + + #[test] + fn motion_and_justify() { + let f = analyze( + "a{transition: color .2s} b{animation-name: spin} c{transition:none} d{animation-duration: 0s} @media (prefers-reduced-motion: reduce){a{transition:none}} p{text-align: justify}", + ); + assert_eq!((f.animations, f.reduced_motion, f.justify), (2, true, 1)); + let mut g = analyze("x{TEXT-ALIGN:JUSTIFY}"); + g.merge(&f); + assert_eq!((g.animations, g.reduced_motion, g.justify), (2, true, 2)); + } + + #[test] + fn performance_and_compat_rules() { + let f = analyze( + "@font-face{src:url(a.woff2) format('woff2'), url(a.ttf)} @font-face{src:url(b.eot)}\ + .x{content-visibility:auto} @keyframes grow{from{width:0}to{width:10px}} @-webkit-keyframes fade{0%{opacity:0}100%{opacity:1}}\ + @keyframes broken{from{top:0}\ + .y{transition:all 1s;-webkit-transition:all 1s} .z{-webkit-box-shadow:none;box-shadow:none}\ + details summary{display:block} summary{display:list-item}", + ); + assert_eq!( + ( + f.legacy_fonts, + f.content_visibility, + f.layout_keyframes, + f.prefix_after_standard, + f.summary_display + ), + (1, 1, 2, 1, 1) + ); + let mut g = analyze(""); + g.merge(&f); + assert_eq!(g.layout_keyframes, 2); + } } diff --git a/crates/devup-access-checker/src/extra.rs b/crates/devup-access-checker/src/extra.rs index d7b10e8..beff7c4 100644 --- a/crates/devup-access-checker/src/extra.rs +++ b/crates/devup-access-checker/src/extra.rs @@ -63,6 +63,108 @@ pub const SCHEMA_REQUIRED: &[(&str, &[&str], &[&str])] = &[ ("breadcrumb_list", &["BreadcrumbList"], &["itemListElement"]), ("faq_page", &["FAQPage"], &["mainEntity"]), ("local_business", &["LocalBusiness"], &["name", "address"]), + // Bing 구조화 데이터 문서: 이름 없는 Person 은 무시된다 + ("person", &["Person"], &["name"]), + // Google 검색 센터 리치 결과 문서의 "Required properties" (최상위 속성만) + ("book", &["Book"], &["name", "author", "url", "workExample"]), + ("course", &["Course"], &["name", "description"]), + ("dataset", &["Dataset"], &["name", "description"]), + ( + "discussion_forum", + &["DiscussionForumPosting", "SocialMediaPosting"], + &["author", "datePublished", "text|image|video"], + ), + ("education_qa", &["Quiz"], &["hasPart"]), + ( + "employer_rating", + &["EmployerAggregateRating"], + &["itemReviewed", "ratingValue", "ratingCount|reviewCount"], + ), + ( + "event", + &[ + "Event", + "MusicEvent", + "SportsEvent", + "TheaterEvent", + "BusinessEvent", + "EducationEvent", + "Festival", + ], + &["name", "startDate", "location"], + ), + ( + "claim_review", + &["ClaimReview"], + &["claimReviewed", "reviewRating", "url"], + ), + ( + "image_license", + &["ImageObject"], + &[ + "contentUrl", + "license|acquireLicensePage|creditText|creator|copyrightNotice", + ], + ), + ( + "job_posting", + &["JobPosting"], + &[ + "title", + "description", + "datePosted", + "hiringOrganization", + "jobLocation|applicantLocationRequirements", + ], + ), + ( + "loyalty_program", + &["MemberProgram"], + &["name", "description", "hasTiers"], + ), + ( + "math_solver", + &["MathSolver"], + &["url", "usageInfo", "potentialAction"], + ), + ("movie", &["Movie"], &["name", "image"]), + ("product_group", &["ProductGroup"], &["name"]), + ("profile_page", &["ProfilePage"], &["mainEntity"]), + ("qa_page", &["QAPage"], &["mainEntity"]), + ("recipe", &["Recipe"], &["name", "image"]), + ( + "software_app", + &[ + "SoftwareApplication", + "MobileApplication", + "WebApplication", + "VideoGame", + ], + &["name", "offers", "aggregateRating|review"], + ), + ( + "vacation_rental", + &["VacationRental"], + &[ + "name", + "identifier", + "image", + "latitude", + "longitude", + "containsPlace", + ], + ), + ( + "video", + &["VideoObject"], + &["name", "thumbnailUrl", "uploadDate"], + ), + ("item_list", &["ItemList"], &["itemListElement"]), + ( + "merchant_return_policy", + &["MerchantReturnPolicy"], + &["applicableCountry", "returnPolicyCategory"], + ), ]; /// JSON-LD 안의 `@type` 이 있는 객체 하나. @@ -97,6 +199,8 @@ pub struct ExtraFacts { /// 같은 호스트에서 로드하는 script/stylesheet 경로 pub same_origin_resources: Vec, pub ld_objects: Vec, + /// 해석된 JSON-LD 블록 원본 (네이버 유형별 확인용) + pub ld_roots: Vec, pub published: Option, pub modified: Option, pub author: Option, @@ -383,9 +487,14 @@ pub fn extract(doc: &Html, base: &Url) -> ExtraFacts { .unwrap_or_default(); if let Ok(u) = base.join(raw.trim()) && u.host_str() == base.host_str() - && !f.same_origin_resources.iter().any(|x| x == u.path()) + && !f + .same_origin_resources + .iter() + .any(|x| x == &u[url::Position::BeforePath..url::Position::AfterQuery]) { - f.same_origin_resources.push(u.path().to_string()); + // robots 규칙은 경로 + 쿼리에 대해 판정한다 + f.same_origin_resources + .push(u[url::Position::BeforePath..url::Position::AfterQuery].to_string()); } } @@ -440,6 +549,7 @@ pub fn extract(doc: &Html, base: &Url) -> ExtraFacts { f.modified = meta("article:modified_time") .or_else(|| meta("og:updated_time")) .or_else(|| ld("dateModified")); + f.ld_roots = ld_values.clone(); // ===== AMP / 앱 링크 메타 ===== for l in doc.select(&LINK) { if rels(&l).iter().any(|r| r == "amphtml") && f.amphtml.is_none() { diff --git a/crates/devup-access-checker/src/fetch.rs b/crates/devup-access-checker/src/fetch.rs index 60e15fe..c41aa5e 100644 --- a/crates/devup-access-checker/src/fetch.rs +++ b/crates/devup-access-checker/src/fetch.rs @@ -23,6 +23,10 @@ fn host_limit(url: &str) -> Arc { .and_then(|u| u.host_str().map(str::to_string)) .unwrap_or_default(); let mut map = HOST_LIMITS.lock().unwrap_or_else(|e| e.into_inner()); + // 아무도 쓰지 않는 항목은 정리한다 (장시간 실행되는 서비스에서 맵이 무한히 커지지 않도록) + if map.len() > 256 { + map.retain(|_, s| Arc::strong_count(s) > 1); + } map.entry(host) .or_insert_with(|| Arc::new(Semaphore::new(PER_HOST_CONCURRENCY))) .clone() @@ -79,6 +83,11 @@ fn is_dns_error(e: &reqwest::Error) -> bool { false } +/// `map_err` 에 함수로 넘기기 위한 [`describe`]. +pub(crate) fn describe_owned(e: reqwest::Error) -> String { + describe(&e) +} + pub(crate) async fn send_get(client: &Client, url: &str) -> Result { send(client, Method::GET, url).await } @@ -89,6 +98,8 @@ pub(crate) async fn send_head(client: &Client, url: &str) -> Result, + /// 원문이 UTF-8 BOM(EF BB BF)으로 시작 + pub bom: bool, + /// 원문에서 첫 `, } /// 대상 페이지용 클라이언트: 인증서 확인을 위해 TLS 정보를 함께 받는다. @@ -160,7 +175,7 @@ pub async fn fetch_page(client: &Client, url: &Url) -> Result { let certificate = res .extensions() .get::() - .and_then(|i| i.peer_certificate()) + .and_then(reqwest::tls::TlsInfo::peer_certificate) .and_then(parse_certificate); let declared_len = res.content_length(); let mut res = res; @@ -183,7 +198,11 @@ pub async fn fetch_page(client: &Client, url: &Url) -> Result { buf.len() }; let body = decode_body(&buf, &headers); + static CHARSET_META: LazyLock = + LazyLock::new(|| regex::bytes::Regex::new(r"(?i)]*?charset").unwrap()); Ok(Page { + bom: buf.starts_with(&[0xEF, 0xBB, 0xBF]), + meta_charset_offset: CHARSET_META.find(&buf).map(|m| m.end()), status, final_url, headers, @@ -199,9 +218,13 @@ pub async fn fetch_page(client: &Client, url: &Url) -> Result { /// 대상 페이지 본문은 이 크기까지만 받는다 (비정상적으로 큰 응답으로 인한 메모리 폭증 방지). pub const MAX_PAGE_BYTES: usize = 15 * 1024 * 1024; -/// Content-Type 의 charset 으로 디코딩한다 (없거나 모르면 UTF-8, BOM 우선). -fn decode_body(bytes: &[u8], headers: &HeaderMap) -> String { - let label = headers +/// HTML 인코딩 판별 순서를 따라 디코딩한다: BOM → Content-Type charset → 앞 1024 바이트의 +/// `` / `http-equiv` → UTF-8. +pub(crate) fn decode_body(bytes: &[u8], headers: &HeaderMap) -> String { + if let Some((enc, _)) = encoding_rs::Encoding::for_bom(bytes) { + return enc.decode(bytes).0.into_owned(); + } + let header_label = headers .get(reqwest::header::CONTENT_TYPE) .and_then(|v| v.to_str().ok()) .and_then(|ct| { @@ -210,12 +233,49 @@ fn decode_body(bytes: &[u8], headers: &HeaderMap) -> String { .find(|(k, _)| k.trim().eq_ignore_ascii_case("charset")) .map(|(_, v)| v.trim().trim_matches('"').to_string()) }); - let encoding = label + let encoding = header_label .and_then(|l| encoding_rs::Encoding::for_label(l.as_bytes())) + .or_else(|| sniff_meta_charset(&bytes[..bytes.len().min(1024)])) .unwrap_or(encoding_rs::UTF_8); encoding.decode(bytes).0.into_owned() } +fn sniff_meta_charset(head: &[u8]) -> Option<&'static encoding_rs::Encoding> { + static RE: LazyLock = LazyLock::new(|| { + regex::bytes::Regex::new(r#"(?i)]*?charset\s*=\s*["']?\s*([a-z0-9_:.\-]+)"#) + .unwrap() + }); + let label = RE.captures(head)?.get(1)?.as_bytes(); + let enc = encoding_rs::Encoding::for_label(label)?; + // 명세상 meta 로 UTF-16 을 선언하면 UTF-8 로 본다 + Some( + if enc == encoding_rs::UTF_16LE || enc == encoding_rs::UTF_16BE { + encoding_rs::UTF_8 + } else { + enc + }, + ) +} + +/// 본문을 `max` 바이트까지만 받아 디코딩한다. (본문, 잘림 여부) +async fn read_text(mut res: Response, max: usize) -> Result<(String, bool), reqwest::Error> { + let headers = res.headers().clone(); + let mut buf = Vec::new(); + let mut truncated = false; + while let Some(chunk) = res.chunk().await? { + buf.extend_from_slice(&chunk); + if buf.len() >= max { + buf.truncate(max); + truncated = true; + break; + } + } + Ok((decode_body(&buf, &headers), truncated)) +} + +/// 표본·대상 확인용 페이지 본문 상한. +const MAX_SAMPLE_BYTES: usize = 5 * 1024 * 1024; + #[derive(Debug, Clone, Copy)] pub enum Expected { Xml, @@ -239,19 +299,55 @@ pub struct FileProbe { /// status 2xx/3xx AND 리다이렉트 우회 없음 AND 형식 일치 pub exists: bool, pub body: Option, - /// 잘리기 전 본문 바이트 수 + /// 본문 바이트 수 (보관 상한과 무관한 전체 크기, 최대 64MB 까지 셈) pub size: Option, + /// 본문이 상한을 넘어 앞부분만 보관함 + pub truncated: bool, + /// 받은 바이트가 UTF-8 로 올바름 (상한에서 잘린 마지막 글자는 허용) + pub utf8: bool, pub error: Option, } +/// 본문이 HTML 문서인지. 앞쪽의 BOM·공백·주석·`` 선언을 건너뛴 뒤 첫 태그로 판단한다. pub fn looks_like_html(body: &str) -> bool { - let lower = body - .trim_start_matches('\u{feff}') - .trim_start() + let mut rest = body.trim_start_matches('\u{feff}').trim_start(); + loop { + if let Some(r) = rest.strip_prefix("") { + Some(end) => rest = r[end + 3..].trim_start(), + None => return false, + } + } else if rest.starts_with("") { + Some(end) => rest = rest[end + 2..].trim_start(), + None => return false, + } + } else { + break; + } + } + let head = rest + .chars() + .take(16) + .collect::() .to_ascii_lowercase(); - lower.starts_with("") + [ + "", + "', '\t', '\n', '\r', '/']) + }) + }) } fn looks_like_xml(body: &str) -> bool { @@ -264,17 +360,6 @@ fn looks_like_xml(body: &str) -> bool { .any(|p| lower.starts_with(p)) } -fn truncate(mut s: String, max: usize) -> String { - if s.len() > max { - let mut cut = max; - while !s.is_char_boundary(cut) { - cut -= 1; - } - s.truncate(cut); - } - s -} - pub async fn probe_file(client: &Client, url: &Url, expected: Expected) -> FileProbe { let mut probe = FileProbe { url: url.to_string(), @@ -294,15 +379,44 @@ pub async fn probe_file(client: &Client, url: &Url, expected: Expected) -> FileP .get(reqwest::header::CONTENT_TYPE) .and_then(|v| v.to_str().ok()) .map(str::to_string); - let body = match res.text().await { - Ok(b) => b, - Err(e) => { - probe.status_code = Some(status); - probe.error = Some(describe(&e)); - return probe; - } + let max = if matches!(expected, Expected::Xml) { + MAX_SITEMAP_BODY + } else { + MAX_PROBE_BODY }; - if let Some(vendor) = crate::signals::bot_challenge(&body) { + // 상한까지만 보관하고, 그 뒤는 크기만 센다 (COUNT_LIMIT 에서 멈춤). + let headers = res.headers().clone(); + let declared_len = res.content_length(); + let mut res = res; + let mut buf = Vec::new(); + let mut read = 0usize; + while read < COUNT_LIMIT { + match res.chunk().await { + Ok(Some(chunk)) => { + read += chunk.len(); + if buf.len() <= max { + buf.extend_from_slice(&chunk); + } + } + Ok(None) => break, + Err(e) => { + probe.status_code = Some(status); + probe.error = Some(describe(&e)); + return probe; + } + } + } + if buf.len() > max { + probe.truncated = true; + buf.truncate(max); + } + probe.utf8 = std::str::from_utf8(&buf).map_or_else(|e| e.error_len().is_none(), |_| true); + let body = decode_body(&buf, &headers); + // 텍스트 파일 본문에 차단 공급자 이름이 언급된 경우를 오인하지 않도록 HTML 응답만 본다 + if let Some(vendor) = looks_like_html(&body) + .then(|| crate::signals::bot_challenge(&body)) + .flatten() + { probe.status_code = Some(status); probe.final_url = Some(final_url.to_string()); probe.error = Some(format!("봇 차단 응답({vendor})")); @@ -315,7 +429,7 @@ pub async fn probe_file(client: &Client, url: &Url, expected: Expected) -> FileP .unwrap_or_default() .to_ascii_lowercase(); let head: String = body.chars().take(2048).collect(); - let is_html = looks_like_html(&head); + let is_html = looks_like_html(&body); let gz = url.path().ends_with(".gz") && (ct.contains("gzip") || ct.contains("octet-stream")); probe.format_valid = match expected { Expected::Xml => (gz || ct.contains("xml") || looks_like_xml(&head)) && !is_html, @@ -329,13 +443,8 @@ pub async fn probe_file(client: &Client, url: &Url, expected: Expected) -> FileP probe.exists = (200..400).contains(&status) && !to_root && probe.format_valid; probe.status_code = Some(status); probe.final_url = Some(final_url.to_string()); - probe.size = Some(body.len()); - let max = if matches!(expected, Expected::Xml) { - MAX_SITEMAP_BODY - } else { - MAX_PROBE_BODY - }; - probe.body = Some(truncate(body, max)); + probe.size = Some(declared_len.map_or(read, |n| (n as usize).max(read))); + probe.body = Some(body); probe } @@ -388,16 +497,9 @@ pub async fn probe_link(client: &Client, raw: &str, base: &Url) -> LinkProbe { pub async fn probe_status_body(client: &Client, url: &Url) -> Result<(u16, String), String> { let res = send_get(client, url.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; let status = res.status().as_u16(); - let mut body = res.text().await.map_err(|e| describe(&e))?; - if body.len() > 65_536 { - let mut cut = 65_536; - while !body.is_char_boundary(cut) { - cut -= 1; - } - body.truncate(cut); - } + let (body, _) = read_text(res, 65_536).await.map_err(describe_owned)?; if let Some(vendor) = crate::signals::bot_challenge(&body) { return Err(format!("봇 차단 응답({vendor})")); } @@ -408,7 +510,7 @@ pub async fn probe_status_body(client: &Client, url: &Url) -> Result<(u16, Strin pub async fn probe_status(client: &Client, url: &Url) -> Result<(u16, Url), String> { let res = send_get(client, url.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; Ok((res.status().as_u16(), res.url().clone())) } @@ -432,13 +534,13 @@ pub async fn redirect_chain( .timeout(timeout) .redirect(Policy::none()) .build() - .map_err(|e| e.to_string())?; + .expect("http client"); let mut hops = Vec::new(); let mut current = url.clone(); for _ in 0..=max { let res = send_get(&client, current.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; let status = res.status().as_u16(); hops.push(Hop { url: current.to_string(), @@ -492,7 +594,7 @@ pub async fn fetch_bytes( ) -> Result<(u16, Option, Vec, bool), String> { let mut res = send_get(client, url.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; let status = res.status().as_u16(); let ct = res .headers() @@ -500,7 +602,7 @@ pub async fn fetch_bytes( .and_then(|v| v.to_str().ok()) .map(str::to_string); let mut buf = Vec::new(); - while let Some(chunk) = res.chunk().await.map_err(|e| describe(&e))? { + while let Some(chunk) = res.chunk().await.map_err(describe_owned)? { buf.extend_from_slice(&chunk); if buf.len() >= max { buf.truncate(max); @@ -510,6 +612,152 @@ pub async fn fetch_bytes( Ok((status, ct, buf, false)) } +/// 하위 리소스 표본: 상태·최종 URL·Content-Type·전체 크기·앞부분 본문. +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct ResourceSample { + pub status: u16, + pub final_url: String, + pub content_type: Option, + /// 받은 바이트 (상한 `max` 에서 멈춤) + pub bytes: usize, + /// 앞 `keep` 바이트 + pub body: Vec, +} + +/// 리소스를 받아 상태와 크기, 앞부분 본문을 돌려준다 (상태가 오류여도 Ok). +pub async fn sample_resource( + client: &Client, + url: &Url, + max: usize, + keep: usize, +) -> Result { + let mut res = send_get(client, url.as_str()) + .await + .map_err(describe_owned)?; + let mut s = ResourceSample { + status: res.status().as_u16(), + final_url: res.url().to_string(), + content_type: res + .headers() + .get(reqwest::header::CONTENT_TYPE) + .and_then(|v| v.to_str().ok()) + .map(str::to_string), + ..Default::default() + }; + while let Some(chunk) = res.chunk().await.map_err(describe_owned)? { + s.bytes += chunk.len(); + if s.body.len() < keep { + s.body + .extend_from_slice(&chunk[..chunk.len().min(keep - s.body.len())]); + } + if s.bytes >= max { + s.bytes = max; + break; + } + } + Ok(s) +} + +/// 리다이렉트를 따라가지 않고 첫 응답의 (상태, Location, HSTS 헤더 유무) 를 본다. +pub async fn first_hop( + ua: &str, + timeout: Duration, + url: &Url, +) -> Result<(u16, Option, bool), String> { + let client = Client::builder() + .user_agent(ua) + .timeout(timeout) + .redirect(Policy::none()) + .build() + .expect("http client"); + let res = send_get(&client, url.as_str()) + .await + .map_err(describe_owned)?; + let h = res.headers(); + Ok(( + res.status().as_u16(), + h.get(reqwest::header::LOCATION) + .and_then(|v| v.to_str().ok()) + .map(str::to_string), + h.contains_key(reqwest::header::STRICT_TRANSPORT_SECURITY), + )) +} + +/// 임의의 Origin 으로 요청해 (Access-Control-Allow-Origin, Allow-Credentials 가 true 인지) 를 본다. +pub async fn cors_probe( + client: &Client, + url: &Url, + origin: &str, +) -> Result<(Option, bool), String> { + let res = client + .get(url.as_str()) + .header(reqwest::header::ORIGIN, origin) + .send() + .await + .map_err(describe_owned)?; + let h = res.headers(); + Ok(( + h.get(reqwest::header::ACCESS_CONTROL_ALLOW_ORIGIN) + .and_then(|v| v.to_str().ok()) + .map(str::to_string), + h.get(reqwest::header::ACCESS_CONTROL_ALLOW_CREDENTIALS) + .and_then(|v| v.to_str().ok()) + .is_some_and(|v| v.trim().eq_ignore_ascii_case("true")), + )) +} + +/// 압축을 풀지 않는 클라이언트로 요청해 (상태, Content-Encoding) 을 본다. +pub async fn raw_encoding( + ua: &str, + timeout: Duration, + url: &Url, +) -> Result<(u16, Option), String> { + let client = Client::builder() + .user_agent(ua) + .timeout(timeout) + .gzip(false) + .brotli(false) + .build() + .expect("http client"); + let res = client + .get(url.as_str()) + .header(reqwest::header::ACCEPT_ENCODING, "gzip, br") + .send() + .await + .map_err(describe_owned)?; + Ok(( + res.status().as_u16(), + res.headers() + .get(reqwest::header::CONTENT_ENCODING) + .and_then(|v| v.to_str().ok()) + .map(str::to_string), + )) +} + +/// 하위 sitemap 을 받아 URL 목록을 돌려준다. `.xml.gz` (gzip) 도 풀어서 읽는다. +pub async fn fetch_sitemap_locs(client: &Client, url: &Url) -> Result, String> { + use std::io::Read; + let (status, _, bytes, _) = fetch_bytes(client, url, MAX_SITEMAP_BODY).await?; + if !(200..300).contains(&status) { + return Err(format!("HTTP {status}")); + } + let xml = if bytes.starts_with(&[0x1f, 0x8b]) { + let mut out = Vec::new(); + flate2::read::GzDecoder::new(bytes.as_slice()) + .take(MAX_SITEMAP_BODY as u64) + .read_to_end(&mut out) + .map_err(|e| format!("gzip: {e}"))?; + out + } else { + bytes + }; + let text = String::from_utf8_lossy(&xml); + if looks_like_html(&text) { + return Err("HTML 응답".into()); + } + Ok(crate::sitemap::summarize(&text).locs) +} + /// sitemap 표본 페이지 요약. #[derive(Debug, Clone)] pub struct SamplePage { @@ -533,7 +781,7 @@ pub struct SamplePage { pub async fn probe_page(client: &Client, url: &Url) -> Result { let res = send_get(client, url.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; let status = res.status().as_u16(); let final_url = res.url().clone(); let header_noindex = res @@ -542,12 +790,14 @@ pub async fn probe_page(client: &Client, url: &Url) -> Result Result Result Result<(u16, HeaderMap), String> { let res = send_get(client, url.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; Ok((res.status().as_u16(), res.headers().clone())) } @@ -594,7 +844,7 @@ pub async fn probe_headers(client: &Client, url: &Url) -> Result<(u16, HeaderMap pub async fn head_length(client: &Client, url: &Url) -> Result<(u16, Option), String> { let res = send_head(client, url.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; let len = res .headers() .get(reqwest::header::CONTENT_LENGTH) @@ -604,22 +854,414 @@ pub async fn head_length(client: &Client, url: &Url) -> Result<(u16, Option } /// AI 크롤러 UA 요청: (상태, 최종 URL, 챌린지 공급자). 본문은 200KB 까지만 본다. -pub async fn probe_ua( +/// ETag·Last-Modified 로 조건부 GET 을 보내 상태 코드를 받는다 (304 지원 확인). +pub async fn conditional_status( client: &Client, url: &Url, -) -> Result<(u16, Url, Option<&'static str>), String> { + etag: Option<&str>, + last_modified: Option<&str>, +) -> Result { + let mut req = client.get(url.as_str()); + if let Some(e) = etag { + req = req.header(reqwest::header::IF_NONE_MATCH, e); + } + if let Some(l) = last_modified { + req = req.header(reqwest::header::IF_MODIFIED_SINCE, l); + } + let res = req.send().await.map_err(describe_owned)?; + Ok(res.status().as_u16()) +} + +/// (상태 코드, 최종 URL, 봇 차단 공급자, ``) +pub type UaProbe = (u16, Url, Option<&'static str>, Option<String>); + +/// 지정한 User-Agent 로 페이지를 받아 상태·차단 여부·제목을 본다 (제목은 일반 요청과 비교해 클로킹 단서로 쓴다). +pub async fn probe_ua(client: &Client, url: &Url) -> Result<UaProbe, String> { let mut res = send_get(client, url.as_str()) .await - .map_err(|e| describe(&e))?; + .map_err(describe_owned)?; let status = res.status().as_u16(); let final_url = res.url().clone(); let mut buf = Vec::new(); - while let Some(chunk) = res.chunk().await.map_err(|e| describe(&e))? { + while let Some(chunk) = res.chunk().await.map_err(describe_owned)? { buf.extend_from_slice(&chunk); if buf.len() >= 200_000 { break; } } - let challenge = crate::signals::bot_challenge(&String::from_utf8_lossy(&buf)); - Ok((status, final_url, challenge)) + let text = String::from_utf8_lossy(&buf); + let challenge = crate::signals::bot_challenge(&text); + let title = scraper::Html::parse_document(&text) + .select(&scraper::Selector::parse("title").expect("valid selector")) + .next() + .map(|t| { + t.text() + .collect::<String>() + .split_whitespace() + .collect::<Vec<_>>() + .join(" ") + }); + Ok((status, final_url, challenge, title)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn decodes_by_meta_charset_when_header_has_none() { + let (bytes, _, _) = + encoding_rs::EUC_KR.encode("<html><head><meta charset=\"euc-kr\"><title>한글"); + let mut h = HeaderMap::new(); + h.insert(reqwest::header::CONTENT_TYPE, "text/html".parse().unwrap()); + assert!(decode_body(&bytes, &h).contains("한글")); + // http-equiv 형식 + let (bytes, _, _) = encoding_rs::EUC_KR + .encode(r#"한글"#); + assert!(decode_body(&bytes, &h).contains("한글")); + // 헤더 charset 이 meta 보다 우선 + h.insert( + reqwest::header::CONTENT_TYPE, + "text/html; charset=utf-8".parse().unwrap(), + ); + assert!(decode_body("한글".as_bytes(), &h).contains("한글")); + } + + #[test] + fn html_detection_skips_prolog_and_comments() { + assert!(looks_like_html("\n")); + assert!(looks_like_html( + "\n" + )); + assert!(looks_like_html(" ")); + assert!(looks_like_html("")); + assert!(!looks_like_html("# Title\n\n> 태그 설명")); + assert!(!looks_like_html("")); + assert!(!looks_like_html("User-agent: *\nDisallow: /")); + assert!(!looks_like_html("")); + // 닫히지 않은 주석·선언 + assert!(!looks_like_html("").unwrap()); +static YANDEX_NOINDEX_CLOSE: LazyLock = + LazyLock::new(|| Regex::new(r"(?i)|").unwrap()); + +/// Google 이미지가 지원하는 형식 (확장자 기준). +const IMAGE_FORMATS: &[&str] = &[ + "bmp", "gif", "jpg", "jpeg", "png", "webp", "svg", "avif", "ico", +]; + +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct HreflangLink { + pub lang: String, + pub href: String, + pub media: bool, +} + +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct GoogleFacts { + /// data-nosnippet 이 span·div·section 외 요소에 붙은 수 + pub data_nosnippet_invalid: Vec, + pub hreflang: Vec, + pub rel_prev: bool, + pub rel_next: bool, + /// src 없는 img (data-src 만 등)·img 없는 picture + pub img_missing_src: usize, + /// Google 이미지 미지원 형식의 img src + pub img_unsupported: Vec, + /// 인라인 style 로 숨긴 텍스트·링크 + pub hidden_text: Vec, + /// 퍼센트 인코딩 안 된 링크 URL (공백·비ASCII) + pub unencoded_links: Vec, + /// 외부 링크 rel 별 수 (sponsored, ugc, nofollow) + pub outbound_sponsored: usize, + pub outbound_ugc: usize, + pub outbound_nofollow: usize, + pub outbound_total: usize, + /// 밑줄로 단어를 구분한 같은 호스트 링크 경로 + pub underscore_paths: Vec, + /// Yandex `` 여는·닫는 태그 수 + pub yandex_noindex_open: usize, + pub yandex_noindex_close: usize, + /// apple-itunes-app meta 가 head 밖에 있음 + pub itunes_meta_outside_head: bool, + /// 본문에서 가장 많이 쓴 문자 체계 + pub body_script: Option<&'static str>, + /// `` 의 별도 모바일 URL + pub mobile_alternate: Option, +} + +fn push(v: &mut Vec, s: &str) { + if v.len() < 20 && !v.iter().any(|x| x == s) { + v.push(s.to_string()); + } +} + +fn own_text(el: &ElementRef) -> bool { + el.children() + .any(|c| matches!(c.value(), Node::Text(t) if !t.trim().is_empty())) +} + +pub fn extract(doc: &Html, html: &str, base: &Url) -> GoogleFacts { + let mut f = GoogleFacts { + yandex_noindex_open: YANDEX_NOINDEX_OPEN.find_iter(html).count(), + yandex_noindex_close: YANDEX_NOINDEX_CLOSE.find_iter(html).count(), + ..Default::default() + }; + let host = base.host_str().unwrap_or_default(); + for el in doc.select(&ALL) { + let e = el.value(); + let name = e.name(); + let get = |a: &str| e.attr(a).map(str::trim); + let rel = get("rel").unwrap_or_default().to_ascii_lowercase(); + let rels: Vec<&str> = rel.split_ascii_whitespace().collect(); + if e.attr("data-nosnippet").is_some() && !matches!(name, "span" | "div" | "section") { + push(&mut f.data_nosnippet_invalid, name); + } + if name == "link" + && rels.contains(&"alternate") + && get("hreflang").is_none() + && get("media").is_some_and(|m| m.contains("max-width") || m.contains("handheld")) + && f.mobile_alternate.is_none() + { + f.mobile_alternate = get("href").map(str::to_string); + } + if name == "link" + && rels.contains(&"alternate") + && let Some(lang) = get("hreflang") + { + f.hreflang.push(HreflangLink { + lang: lang.to_string(), + href: get("href").unwrap_or_default().to_string(), + media: e.attr("media").is_some(), + }); + } + if matches!(name, "link" | "a") { + f.rel_prev |= rels.contains(&"prev") || rels.contains(&"previous"); + f.rel_next |= rels.contains(&"next"); + } + if name == "img" { + let src = get("src").unwrap_or_default(); + if src.is_empty() { + f.img_missing_src += 1; + } else if !src.starts_with("data:") { + let path = src.split(['?', '#']).next().unwrap_or_default(); + let file = path.rsplit('/').next().unwrap_or_default(); + if let Some((_, ext)) = file.rsplit_once('.') + && ext.len() <= 5 + && !IMAGE_FORMATS.contains(&ext.to_ascii_lowercase().as_str()) + { + push(&mut f.img_unsupported, src); + } + } + } + if name == "picture" + && !el + .children() + .filter_map(ElementRef::wrap) + .any(|c| c.value().name() == "img") + { + f.img_missing_src += 1; + } + if let Some(style) = get("style") + && HIDDEN_STYLE.is_match(style) + && (own_text(&el) || name == "a") + { + push(&mut f.hidden_text, &format!("{name}[style=\"{style}\"]")); + } + if name == "a" + && let Some(href) = e.attr("href") + { + let h = href.trim(); + if h.contains(' ') || !h.is_ascii() { + push(&mut f.unencoded_links, h); + } + if let Ok(u) = base.join(h) + && matches!(u.scheme(), "http" | "https") + { + if u.host_str() == Some(host) { + if u.path().contains('_') { + push(&mut f.underscore_paths, u.path()); + } + } else { + f.outbound_total += 1; + f.outbound_sponsored += usize::from(rels.contains(&"sponsored")); + f.outbound_ugc += usize::from(rels.contains(&"ugc")); + f.outbound_nofollow += usize::from(rels.contains(&"nofollow")); + } + } + } + if name == "meta" + && get("name").is_some_and(|n| n.eq_ignore_ascii_case("apple-itunes-app")) + && !el + .ancestors() + .filter_map(ElementRef::wrap) + .any(|a| a.value().name() == "head") + { + f.itunes_meta_outside_head = true; + } + } + let mut text = String::new(); + if let Some(body) = doc + .select(&Selector::parse("body").expect("valid selector")) + .next() + { + for node in body.descendants() { + if let Some(t) = node.value().as_text() + && !node.ancestors().filter_map(ElementRef::wrap).any(|a| { + matches!( + a.value().name(), + "script" | "style" | "noscript" | "template" + ) + }) + && text.len() < 20_000 + { + text.push_str(t); + } + } + } + f.body_script = dominant_script(&text); + f +} + +/// Google 이 정의한 robots meta 규칙 (robots-tags.json) + 다른 검색엔진의 알려진 값. +pub const KNOWN_ROBOTS: &[&str] = &[ + "all", + "noindex", + "nofollow", + "none", + "nosnippet", + "indexifembedded", + "max-snippet", + "max-image-preview", + "max-video-preview", + "notranslate", + "noimageindex", + "unavailable_after", + "index", + "follow", + "noarchive", + "nocache", + "nosourceinfo", + "noodp", + "noydir", + "noyaca", + "ai-training", + "ai-grounding", +]; + +/// hreflang 값이 ISO 639-1(-ISO 3166-1 alpha-2) 또는 x-default 인지. +pub fn hreflang_valid(code: &str) -> bool { + static RE: LazyLock = LazyLock::new(|| { + Regex::new(r"(?i)^(?:x-default|[a-z]{2}(?:-[a-z]{4})?(?:-[a-z]{2})?)$").unwrap() + }); + RE.is_match(code.trim()) && !code.trim().eq_ignore_ascii_case("en-uk") +} + +/// 문자열에서 가장 많이 쓴 문자 체계 (hangul/latin/han/kana/cyrillic/arabic/other). 글자가 없으면 None. +pub fn dominant_script(text: &str) -> Option<&'static str> { + let mut counts = [0usize; 6]; + for c in text.chars().filter(|c| c.is_alphabetic()) { + let i = match c as u32 { + 0xAC00..=0xD7A3 | 0x1100..=0x11FF | 0x3130..=0x318F => 0, + 0x41..=0x5A | 0x61..=0x7A | 0xC0..=0x24F => 1, + 0x4E00..=0x9FFF | 0x3400..=0x4DBF => 2, + 0x3040..=0x30FF => 3, + 0x400..=0x4FF => 4, + 0x600..=0x6FF => 5, + _ => continue, + }; + counts[i] += 1; + } + let (i, n) = counts.iter().enumerate().max_by_key(|(_, n)| **n)?; + (*n > 0).then_some(["hangul", "latin", "han", "kana", "cyrillic", "arabic"][i]) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn extracts_signals() { + let base = Url::parse("https://a.com/").unwrap(); + let html = r#" + + +

    x

    ok + +

    숨김

    안쪽
    +한글광고댓글 +밑줄메일다음 +숨김"#; + let f = extract(&Html::parse_document(html), html, &base); + assert_eq!(f.data_nosnippet_invalid, ["p"]); + assert_eq!(f.hreflang.len(), 2); + assert!(f.hreflang[0].media && !f.hreflang[1].media); + assert!(f.rel_prev && f.rel_next); + assert_eq!(f.img_missing_src, 2); + assert_eq!(f.img_unsupported, ["b.tiff?x=1"]); + assert_eq!(f.hidden_text.len(), 2, "{:?}", f.hidden_text); + assert_eq!(f.unencoded_links, ["/검색 결과"]); + assert_eq!( + ( + f.outbound_total, + f.outbound_sponsored, + f.outbound_ugc, + f.outbound_nofollow + ), + (2, 1, 1, 1) + ); + assert_eq!(f.underscore_paths, ["/my_page"]); + assert_eq!((f.yandex_noindex_open, f.yandex_noindex_close), (2, 1)); + assert!(!f.itunes_meta_outside_head); + assert_eq!(f.body_script, Some("hangul")); + assert_eq!(f.mobile_alternate.as_deref(), Some("https://m.a.com/")); + let html = r#""#; + assert!(extract(&Html::parse_document(html), html, &base).itunes_meta_outside_head); + } + + #[test] + fn helpers() { + for c in ["en", "ko-KR", "zh-Hant-TW", "x-default", "EN-us"] { + assert!(hreflang_valid(c), "{c}"); + } + for c in ["en-UK", "kor", "es-419", ""] { + assert!(!hreflang_valid(c), "{c}"); + } + assert_eq!( + dominant_script("데브파이브 홈페이지 DevFive"), + Some("hangul") + ); + assert_eq!(dominant_script("Hello 세계"), Some("latin")); + assert_eq!(dominant_script("中文 日本語 かな"), Some("han")); + assert_eq!(dominant_script("かなカナ"), Some("kana")); + assert_eq!(dominant_script("Привет"), Some("cyrillic")); + assert_eq!(dominant_script("مرحبا"), Some("arabic")); + assert_eq!(dominant_script("123 !!"), None); + assert_eq!(dominant_script("ไทย"), None); + } +} diff --git a/crates/devup-access-checker/src/html.rs b/crates/devup-access-checker/src/html.rs index 73a3f57..d650bfb 100644 --- a/crates/devup-access-checker/src/html.rs +++ b/crates/devup-access-checker/src/html.rs @@ -15,6 +15,7 @@ fn sel(s: &str) -> Selector { static META: LazyLock = LazyLock::new(|| sel("meta")); static LINK: LazyLock = LazyLock::new(|| sel("link[rel]")); static TITLE: LazyLock = LazyLock::new(|| sel("title")); +static BASE: LazyLock = LazyLock::new(|| sel("base[href]")); static HTML: LazyLock = LazyLock::new(|| sel("html")); static BODY: LazyLock = LazyLock::new(|| sel("body")); static H1: LazyLock = LazyLock::new(|| sel("h1")); @@ -50,6 +51,8 @@ pub struct JsonLd { #[derive(Debug, Clone, Default)] pub struct PageFacts { + /// `` 로 정해진 문서 기준 URL (없으면 None). 상대 링크는 이것을 기준으로 해석한다. + pub document_base: Option, pub lang: Option, pub title: Option, pub charset: Option, @@ -88,11 +91,24 @@ pub struct PageFacts { pub extra: crate::extra::ExtraFacts, /// 웹 접근성 사실 pub a11y: crate::a11y::A11yFacts, + pub more: crate::more::MoreFacts, + pub rules: crate::rules::RuleFacts, + pub spec: crate::spec::SpecFacts, + pub search: crate::search::SearchFacts, + pub sec: crate::sec::SecFacts, + pub google: crate::google::GoogleFacts, + pub aria: crate::aria::AriaFacts, + pub quality: crate::quality::QualityFacts, /// 신뢰·법적 정보 pub trust: crate::trust::TrustFacts, } impl PageFacts { + /// 상대 링크 해석 기준: `` 가 있으면 그것, 없으면 페이지 URL. + pub fn link_base<'a>(&'a self, page: &'a Url) -> &'a Url { + self.document_base.as_ref().unwrap_or(page) + } + /// `name` 우선, 없으면 `property` 에서 찾는다 (og:/twitter: 는 두 방식이 혼용된다). pub fn meta(&self, key: &str) -> Option<&str> { let key = key.to_ascii_lowercase(); @@ -183,9 +199,17 @@ fn push_unique(list: &mut Vec, s: &str) { } /// HTML 문서에서 사실을 추출한다. `base` 는 내부/외부 링크 구분과 혼합 콘텐츠 판별에 쓴다. -pub fn extract(html: &str, base: &Url) -> PageFacts { +pub fn extract(html: &str, page_url: &Url) -> PageFacts { let doc = Html::parse_document(html); + // 첫 번째 만 유효하다 (HTML 명세) + let document_base = doc + .select(&BASE) + .find_map(|b| b.value().attr("href")) + .and_then(|h| page_url.join(h.trim()).ok()) + .filter(|u| matches!(u.scheme(), "http" | "https")); + let base = document_base.as_ref().unwrap_or(page_url); let mut f = PageFacts { + document_base: document_base.clone(), lang: doc .select(&HTML) .next() @@ -317,7 +341,7 @@ pub fn extract(html: &str, base: &Url) -> PageFacts { let Ok(u) = base.join(href) else { continue }; match u.scheme() { "http" | "https" => { - if u.host_str() == base.host_str() { + if u.host_str() == page_url.host_str() { f.internal_links += 1; } else { f.external_links += 1; @@ -327,7 +351,7 @@ pub fn extract(html: &str, base: &Url) -> PageFacts { } } - if base.scheme() == "https" { + if page_url.scheme() == "https" { for el in doc.select(&SUBRESOURCE) { let src = attr(&el, "src") .or_else(|| attr(&el, "href")) @@ -342,6 +366,14 @@ pub fn extract(html: &str, base: &Url) -> PageFacts { f.extra = crate::extra::extract(&doc, base); f.a11y = crate::a11y::extract(&doc); f.trust = crate::trust::extract(&doc, base); + f.more = crate::more::extract(&doc, base); + f.rules = crate::rules::extract(&doc, html, page_url); + f.spec = crate::spec::extract(&doc); + f.search = crate::search::extract(&doc, base); + f.sec = crate::sec::extract(&doc, base); + f.google = crate::google::extract(&doc, html, base); + f.aria = crate::aria::extract(&doc, base); + f.quality = crate::quality::extract(&doc, base); f } @@ -438,4 +470,105 @@ mod tests { let f = extract(html, &Url::parse("http://example.com/").unwrap()); assert!(f.insecure_subresources.is_empty()); } + + #[test] + fn base_href_sets_link_base() { + let page = Url::parse("https://a.com/ko/about").unwrap(); + let f = extract( + r#"x"#, + &page, + ); + assert_eq!(f.link_base(&page).as_str(), "https://a.com/"); + assert_eq!( + f.link_base(&page) + .join(f.favicon.as_deref().unwrap()) + .unwrap() + .as_str(), + "https://a.com/favicon.ico" + ); + let f = extract("", &page); + assert_eq!(f.link_base(&page), &page); + } + + /// 자주 나오지 않는 마크업 형태들을 한 문서에 모아 추출 결과를 확인한다. + #[test] + fn extracts_less_common_markup() { + let long_alt = "가".repeat(130); + let html = format!( + r#" + + + + + + + + + +{long_alt} +x +"# + ); + let f = extract(&html, &base()); + assert_eq!(f.charset.as_deref(), Some("euc-kr")); + assert_eq!(f.favicon, None, "빈 href 는 무시"); + assert_eq!(f.apple_touch_icon.as_deref(), Some("/apple.png")); + assert_eq!(f.font_preloads, 0); + assert_eq!(f.json_ld.same_as, vec!["https://x.com/a".to_string()]); + assert_eq!(f.a11y.buttons, 2); + assert_eq!(f.a11y.unnamed_buttons, 1); + assert_eq!(f.a11y.long_alts, 1); + assert!( + f.extra.image_formats.is_empty(), + "알 수 없는 확장자는 집계하지 않음" + ); + let article = &f.extra.ld_objects[0]; + assert!( + !article.keys.contains(&"name".to_string()), + "null 값은 빈 값" + ); + assert!(article.keys.contains(&"wordCount".to_string())); + assert_eq!(f.extra.published.as_deref(), Some("2024-01-01")); + assert_eq!(f.extra.modified.as_deref(), Some("2024-02-02")); + assert!(f.extra.inline_css.has_focus_visible); + } + + /// frameset 문서에는 body 가 없다. + #[test] + fn frameset_document_has_no_body_text() { + let f = extract( + r#"t"#, + &base(), + ); + assert_eq!(f.body_text_len, 0); + } + + /// 특이한 마크업에서도 추출이 패닉하지 않아야 한다 (실제 사이트에서 template 로 패닉한 적이 있음). + #[test] + fn extract_never_panics_on_odd_markup() { + let cases = [ + "", + "plain text", + "", + "t링크

    p

    ", + "x", + "", + "
    중첩
    ", + "
    � � &unknown;

    ", + "
    j", + "
    x
    ", + "", + "
    x
    ", + "", + ]; + let page = base(); + for html in cases { + let f = extract(html, &page); + let _ = f.link_base(&page); + } + let deep = "
    ".repeat(5_000); + let _ = extract(&deep, &page); + } } diff --git a/crates/devup-access-checker/src/lib.rs b/crates/devup-access-checker/src/lib.rs index 0c26a00..2a4e1a6 100644 --- a/crates/devup-access-checker/src/lib.rs +++ b/crates/devup-access-checker/src/lib.rs @@ -12,19 +12,30 @@ //! # Ok(()) } //! ``` -pub mod a11y; -pub mod catalog; -pub mod checks; -pub mod css; -pub mod extra; -pub mod fetch; -pub mod html; -pub mod llms; -pub mod model; -pub mod robots; -pub mod signals; -pub mod sitemap; -pub mod trust; +mod a11y; +mod aria; +mod catalog; +mod checks; +mod css; +mod extra; +mod fetch; +mod google; +mod html; +mod llms; +mod model; +mod more; +mod naver_ld; +mod quality; +mod robots; +mod rules; +mod schema_types; +mod search; +mod sec; +mod signals; +mod sitemap; +mod spec; +mod trust; +mod vulnjs; use std::time::{Duration, Instant}; @@ -49,7 +60,9 @@ const MAX_IMAGES: usize = 80; /// 존재하지 않을 경로 (404 페이지 확인용) const NOT_FOUND_PATH: &str = "/__devup_access_checker_404_probe__"; +/// 대상 페이지 자체를 점검할 수 없을 때의 오류. 부속 요청 실패는 오류가 아니라 `unknown` 항목으로 보고한다. #[derive(Debug, thiserror::Error)] +#[non_exhaustive] pub enum Error { #[error("invalid url: {0}")] InvalidUrl(String), @@ -57,7 +70,15 @@ pub enum Error { Fetch { url: String, reason: String }, } +/// 점검 옵션. `Options::default()` 로 만든 뒤 필요한 필드만 바꿔 쓴다. +/// +/// ``` +/// let mut opts = devup_access_checker::Options::default(); +/// opts.check_ai_user_agents = false; +/// opts.page_samples = 0; +/// ``` #[derive(Debug, Clone)] +#[non_exhaustive] pub struct Options { pub user_agent: String, /// 대상 페이지 요청 timeout @@ -66,7 +87,7 @@ pub struct Options { pub probe_timeout: Duration, /// favicon / og:image 등 링크 접근 가능 여부 검증 pub check_links: bool, - /// AI 크롤러 User-Agent 로 페이지를 요청해 응답 확인 + /// AI·검색 크롤러(Yeti·Bingbot) User-Agent 로 페이지를 요청해 응답 확인 pub check_ai_user_agents: bool, /// http:// 버전 리다이렉트, 리다이렉트 체인, www 변형, 압축 여부 확인 pub check_transport: bool, @@ -78,6 +99,8 @@ pub struct Options { pub check_resources: bool, /// 여러 페이지 표본 크롤링 페이지 수 (0 = 생략). sitemap 을 우선 쓰고 부족하면 내부 링크로 채운다. pub page_samples: usize, + /// IndexNow 키. 지정하면 `https://호스트/{키}.txt` 키 파일을 확인한다 (키 파일 이름은 비밀이라 찾아낼 수 없음) + pub indexnow_key: Option, } impl Default for Options { @@ -93,6 +116,7 @@ impl Default for Options { internal_link_samples: 10, page_samples: 10, check_resources: true, + indexnow_key: None, } } } @@ -115,9 +139,10 @@ pub fn normalize_url(input: &str) -> Result { Ok(url) } +/// URL 점검기. #[derive(Debug, Clone, Default)] pub struct Checker { - pub options: Options, + options: Options, } impl Checker { @@ -125,6 +150,10 @@ impl Checker { Self { options } } + pub fn options(&self) -> &Options { + &self.options + } + pub async fn check(&self, input: &str) -> Result { let started = Instant::now(); let target = normalize_url(input)?; @@ -186,7 +215,7 @@ impl Checker { } let one = |raw: Option| { let probe = &probe; - let base = &base; + let base = facts.link_base(&base); async move { match raw { Some(r) => Some(fetch::probe_link(probe, &r, base).await), @@ -216,13 +245,12 @@ impl Checker { let transport_fut = async { if !opts.check_transport { - return (None, None, None, None); + return (None, None, None, None, Vec::new()); } let mut http_url = base.clone(); + // 대상은 항상 http(s) 이므로 스킴 변경은 실패하지 않는다 + let _ = http_url.set_scheme("http"); let http_fut = async { - if http_url.set_scheme("http").is_err() { - return Err("cannot build http url".to_string()); - } // 80 포트를 막아 둔 사이트가 많아 짧게 본다 let quick = fetch::build_client( &opts.user_agent, @@ -231,26 +259,52 @@ impl Checker { fetch::probe_status(&quick, &http_url).await }; let enc_fut = probe_encoding(&opts.user_agent, opts.probe_timeout, &base); - let chain_fut = - fetch::redirect_chain(&opts.user_agent, opts.probe_timeout, &target, 10); - let variant_fut = async { - let url = host_variant(&base)?; - let result = fetch::probe_status(&probe, &url).await; - Some(checks::HostVariant { url, result }) + let chain_fut = async { + let chain = + fetch::redirect_chain(&opts.user_agent, opts.probe_timeout, &target, 10).await; + // 최종 호스트가 아닌 경유 호스트의 robots.txt (최대 3곳) + let mut hosts: Vec = Vec::new(); + for h in chain.iter().flatten() { + if let Ok(u) = Url::parse(&h.url) + && u.host_str() != base.host_str() + && !hosts.iter().any(|x| x.host_str() == u.host_str()) + && hosts.len() < 3 + { + hosts.push(u.join("/robots.txt").expect("join path")); + } + } + let robots = join_all(hosts.iter().map(|u| { + let probe = &probe; + async move { + let host = u.host_str().unwrap_or_default().to_string(); + ( + host, + fetch::probe_file(probe, u, fetch::Expected::PlainText).await, + ) + } + })) + .await; + (chain, robots) }; - let (h, e, c, v) = tokio::join!(http_fut, enc_fut, chain_fut, variant_fut); - (Some(h), Some(e), Some(c), v) + let variant_fut = probe_host_variant(&probe, host_variant(&base)); + let (h, e, (c, r), v) = tokio::join!(http_fut, enc_fut, chain_fut, variant_fut); + (Some(h), Some(e), Some(c), v, r) }; let ai_fut = async { if !opts.check_ai_user_agents { return Vec::new(); } - join_all(checks::AI_USER_AGENTS.iter().map(|(id, ua)| { - let c = fetch::build_client(ua, opts.probe_timeout); - let base = &base; - async move { (*id, fetch::probe_ua(&c, base).await) } - })) + join_all( + checks::AI_USER_AGENTS + .iter() + .chain(checks::SEARCH_USER_AGENTS) + .map(|(id, ua)| { + let c = fetch::build_client(ua, opts.probe_timeout); + let base = &base; + async move { (*id, fetch::probe_ua(&c, base).await) } + }), + ) .await }; @@ -268,6 +322,8 @@ impl Checker { "/.well-known/apple-app-site-association", "/.well-known/assetlinks.json", "/ads.txt", + "/.well-known/ard.json", + "/.well-known/ai-catalog.json", ] .map(at); let [ @@ -284,6 +340,8 @@ impl Checker { aasa_url, assetlinks_url, ads_url, + ard_url, + ai_catalog_url, ] = &urls; use fetch::Expected::{Binary, Json, PlainText, Xml}; @@ -317,31 +375,32 @@ impl Checker { let summary = checks::pick_sitemap(&sitemap, &declared) .filter(|sm| !checks::is_gz(sm)) .map(|sm| sitemap::summarize(sm.body.as_deref().unwrap_or_default())); - // sitemap 점검용 표본 (index 면 하위 sitemap 들) - let sitemap_sample_urls: Vec = match &summary { - Some(s) if opts.sitemap_samples > 0 => { - s.locs.iter().take(opts.sitemap_samples).cloned().collect() - } - _ => Vec::new(), - }; - // 여러 페이지 표본: index 면 첫 하위 sitemap 의 URL 을 쓴다 + // 페이지 URL 목록: index 면 첫 하위 sitemap 의 URL 을 쓴다 + let mut sample_note: Option = + (opts.sitemap_samples == 0).then(|| "점검하지 않음 (옵션으로 생략)".to_string()); let page_locs: Vec = match &summary { - Some(s) if s.is_index && opts.page_samples > 0 => { + Some(s) if s.is_index && (opts.sitemap_samples > 0 || opts.page_samples > 0) => { match s.locs.first().and_then(|u| Url::parse(u).ok()) { - Some(child) => { - let p = fetch::probe_file(&probe, &child, Xml).await; - if p.exists && !checks::is_gz(&p) { - sitemap::summarize(p.body.as_deref().unwrap_or_default()).locs - } else { + Some(child) => match fetch::fetch_sitemap_locs(&probe, &child).await { + Ok(locs) => locs, + Err(e) => { + sample_note = + Some(format!("첫 하위 sitemap({child}) 읽기 실패: {e}")); Vec::new() } - } + }, None => Vec::new(), } } Some(s) => s.locs.clone(), None => Vec::new(), }; + // sitemap 점검용 표본: sitemap 에 실린 페이지 앞에서부터 + let sitemap_sample_urls: Vec = page_locs + .iter() + .take(opts.sitemap_samples) + .cloned() + .collect(); let (page_urls, from_sitemap, from_links) = if opts.page_samples > 0 { pick_page_samples( &page_locs, @@ -387,7 +446,11 @@ impl Checker { ( sitemap, robots, - checks::SitemapDetail { declared, samples }, + checks::SitemapDetail { + declared, + samples, + sample_note, + }, site, ) }; @@ -407,6 +470,8 @@ impl Checker { fetch::probe_file(&probe, assetlinks_url, Json), fetch::probe_file(&probe, ads_url, PlainText), fetch::probe_file(&probe, &md_url, PlainText), + fetch::probe_file(&probe, ard_url, Json), + fetch::probe_file(&probe, ai_catalog_url, Json), ) }; @@ -416,11 +481,7 @@ impl Checker { return None; } // 대상 페이지를 받을 때 함께 얻은 인증서를 쓴다 (추가 요청 없음) - Some(match (base.scheme(), &page.certificate) { - ("https", Some(c)) => Ok(Some(c.clone())), - ("https", None) => Err("no peer certificate".to_string()), - _ => Ok(None), - }) + Some(tls_result(base.scheme(), page.certificate.as_ref())) }; let variants_fut = async { if !opts.check_transport { @@ -437,7 +498,7 @@ impl Checker { }; let og_fut = async { let raw = facts.meta("og:image").filter(|_| opts.check_links)?; - let Ok(url) = base.join(raw) else { + let Ok(url) = facts.link_base(&base).join(raw) else { return Some(Err(format!("invalid url: {raw}"))); }; Some(fetch::fetch_bytes(&probe, &url, 8 * 1024 * 1024).await.map( @@ -459,30 +520,25 @@ impl Checker { if !opts.check_links || opts.internal_link_samples == 0 { return None; } - let urls: Vec = facts + // 내부 링크 URL 은 이미 절대 URL 로 정규화되어 있다 + let urls: Vec = facts .extra .internal_link_urls .iter() .take(opts.internal_link_samples) - .cloned() + .filter_map(|raw| Url::parse(raw).ok()) .collect(); Some( - join_all(urls.into_iter().map(|raw| { + join_all(urls.into_iter().map(|u| { let probe = &probe; - async move { - let result = match Url::parse(&raw) { - Ok(u) => fetch::probe_status(probe, &u).await, - Err(e) => Err(format!("invalid url: {e}")), - }; - (raw, result) - } + async move { (u.to_string(), fetch::probe_status(probe, &u).await) } })) .await, ) }; let manifest_fut = async { let raw = facts.manifest.as_deref().filter(|_| opts.check_links)?; - let url = base.join(raw).ok()?; + let url = facts.link_base(&base).join(raw).ok()?; Some(fetch::fetch_bytes(&probe, &url, 1024 * 1024).await.map( |(status, _, bytes, _)| { ( @@ -496,7 +552,11 @@ impl Checker { if !opts.check_links { return None; } - let url = match facts.favicon.as_deref().and_then(|f| base.join(f).ok()) { + let url = match facts + .favicon + .as_deref() + .and_then(|f| facts.link_base(&base).join(f).ok()) + { Some(u) => u, None => favicon_url.clone(), }; @@ -522,7 +582,10 @@ impl Checker { }; // canonical 대상 / hreflang 대상 / 외부 CSS / 페이지 무게 let canonical_fut = async { - let c = facts.canonical.as_deref().and_then(|c| base.join(c).ok())?; + let c = facts + .canonical + .as_deref() + .and_then(|c| facts.link_base(&base).join(c).ok())?; if c.as_str().trim_end_matches('/') == base.as_str().trim_end_matches('/') { return None; } @@ -532,7 +595,13 @@ impl Checker { let targets: Vec<(String, Url)> = facts .hreflang .iter() - .filter_map(|h| base.join(&h.href).ok().map(|u| (h.lang.clone(), u))) + .filter_map(|h| { + facts + .link_base(&base) + .join(&h.href) + .ok() + .map(|u| (h.lang.clone(), u)) + }) .filter(|(_, u)| { u.as_str().trim_end_matches('/') != base.as_str().trim_end_matches('/') }) @@ -549,23 +618,22 @@ impl Checker { return None; } let urls = &facts.extra.stylesheet_urls; - let results: Vec> = - stream::iter(urls.iter().take(MAX_CSS_FILES)) - .map(|u| { - let probe = &probe; - async move { - let url = Url::parse(u).map_err(|e| e.to_string())?; - let (status, _, bytes, _) = - fetch::fetch_bytes(probe, &url, 5 * 1024 * 1024).await?; - if !(200..300).contains(&status) { - return Err(format!("HTTP {status}")); - } - Ok(String::from_utf8_lossy(&bytes).into_owned()) + let results: Vec> = stream::iter(sample(urls, MAX_CSS_FILES)) + .map(|u| { + let probe = &probe; + async move { + let url = Url::parse(u).map_err(|e| e.to_string())?; + let (status, _, bytes, _) = + fetch::fetch_bytes(probe, &url, 5 * 1024 * 1024).await?; + if !(200..300).contains(&status) { + return Err(format!("HTTP {status}")); } - }) - .buffer_unordered(8) - .collect() - .await; + Ok(String::from_utf8_lossy(&bytes).into_owned()) + } + }) + .buffer_unordered(8) + .collect() + .await; let mut out = checks::ExternalCss { total: urls.len(), ..Default::default() @@ -587,46 +655,236 @@ impl Checker { return None; } let x = &facts.extra; - let js: Vec = stream::iter(x.script_urls.iter().take(MAX_JS_FILES)) - .map(|u| { - let probe = &probe; - async move { - let url = Url::parse(u).ok()?; - fetch::fetch_bytes(probe, &url, 20 * 1024 * 1024) - .await - .ok() - .map(|(_, _, b, _)| b.len()) - } + let scripts: Vec<(String, Result)> = stream::iter( + sample(&x.script_urls, MAX_JS_FILES) + .into_iter() + .filter_map(|u| Url::parse(u).ok().map(|url| (u, url))), + ) + .map(|(u, url)| { + let probe = &probe; + async move { + let r = + fetch::sample_resource(probe, &url, 20 * 1024 * 1024, 1024 * 1024).await; + (u.clone(), r) + } + }) + .buffer_unordered(8) + .collect() + .await; + let js: Vec<(String, usize)> = scripts + .iter() + .filter_map(|(u, r)| { + r.as_ref() + .ok() + .filter(|s| (200..300).contains(&s.status)) + .map(|s| (u.clone(), s.bytes)) }) - .buffer_unordered(8) - .filter_map(|x| async move { x }) - .collect() - .await; - let imgs: Vec> = stream::iter(x.image_urls.iter().take(MAX_IMAGES)) + .collect(); + let imgs: Vec<(String, Option)> = stream::iter(sample(&x.image_urls, MAX_IMAGES)) .map(|u| { let probe = &probe; async move { let url = Url::parse(u).ok()?; - fetch::head_length(probe, &url) + let len = fetch::head_length(probe, &url) .await .ok() - .and_then(|(_, len)| len) + .and_then(|(_, len)| len); + Some((u.clone(), len)) } }) .buffer_unordered(8) + .filter_map(|x| async move { x }) .collect() .await; + // 크기를 알아낸 이미지 + let sized: Vec<(String, u64)> = imgs + .iter() + .filter_map(|(u, l)| l.map(|l| (u.clone(), l))) + .collect(); Some(checks::PageWeight { js_total: x.script_urls.len(), js_checked: js.len(), - js_bytes: js.iter().sum(), + js_bytes: js.iter().map(|(_, n)| n).sum(), images_total: x.image_urls.len(), images_checked: imgs.len(), - images_unknown: imgs.iter().filter(|l| l.is_none()).count(), - image_bytes: imgs.iter().flatten().sum(), + images_unknown: imgs.iter().filter(|(_, l)| l.is_none()).count(), + image_bytes: imgs.iter().filter_map(|(_, l)| *l).sum(), + large_scripts: checks::largest( + js.iter().map(|(u, n)| (u.clone(), *n as u64)), + checks::LARGE_SCRIPT_BYTES, + ), + large_images: checks::largest(sized.iter().cloned(), checks::LARGE_IMAGE_BYTES), + scripts, + large_gifs: checks::largest( + sized.iter().filter(|(u, _)| is_gif(u)).cloned(), + checks::LARGE_GIF_BYTES, + ), }) }; + // 검색엔진 가이드: 피드 본문, Bing 인증 파일, 없는 경로 리다이렉트, IndexNow 키 파일 + let search_fut = async { + let feed = async { + let url = facts + .feeds + .first() + .and_then(|f| facts.link_base(&base).join(f).ok()) + .filter(|_| opts.check_links)?; + Some(fetch::probe_file(&probe, &url, Xml).await) + }; + let bing_url = at("/BingSiteAuth.xml"); + let bing = fetch::probe_file(&probe, &bing_url, Xml); + let not_found_chain = async { + if !opts.check_transport { + return None; + } + Some( + fetch::redirect_chain(&opts.user_agent, opts.probe_timeout, not_found_url, 5) + .await, + ) + }; + let indexnow = async { + let key = opts.indexnow_key.as_deref()?.trim().to_string(); + let valid = (8..=128).contains(&key.len()) + && key.bytes().all(|b| b.is_ascii_hexdigit() || b == b'-'); + if !valid { + return Some((key, None)); + } + let url = at(&format!("/{key}.txt")); + Some((key, Some(fetch::probe_file(&probe, &url, PlainText).await))) + }; + let llms_subpath = async { + let path = base.path(); + let dir = &path[..=path.rfind('/').unwrap_or(0)]; + if dir == "/" { + return None; + } + Some(fetch::probe_file(&probe, &at(&format!("{dir}llms.txt")), PlainText).await) + }; + let card_url = at("/.well-known/agent-card.json"); + let agent_card = fetch::probe_file(&probe, &card_url, Json); + let robots_chain = async { + if !opts.check_transport { + return None; + } + Some( + fetch::redirect_chain(&opts.user_agent, opts.probe_timeout, robots_url, 6) + .await, + ) + }; + let change_password = async { + let url = at("/.well-known/change-password"); + Some(fetch::redirect_chain(&opts.user_agent, opts.probe_timeout, &url, 0).await) + }; + let conditional = async { + let etag = page.headers.get("etag").and_then(|v| v.to_str().ok()); + let lm = page + .headers + .get("last-modified") + .and_then(|v| v.to_str().ok()); + if etag.is_none() && lm.is_none() { + return None; + } + Some(fetch::conditional_status(&probe, &base, etag, lm).await) + }; + let asset_encodings = async { + if !opts.check_resources { + return Vec::new(); + } + let urls: Vec<(&String, Url)> = facts + .extra + .stylesheet_urls + .iter() + .chain(&facts.extra.script_urls) + .filter_map(|u| Url::parse(u).ok().map(|url| (u, url))) + .take(5) + .collect(); + join_all(urls.into_iter().map(|(u, url)| async move { + let r = fetch::raw_encoding(&opts.user_agent, opts.probe_timeout, &url).await; + (u.clone(), r) + })) + .await + }; + let statement = async { + if !opts.check_links { + return None; + } + let raw = facts.aria.statement_links.first()?; + let u = facts.link_base(&base).join(raw).ok()?; + Some((u.to_string(), fetch::probe_status_body(&probe, &u).await)) + }; + let mobile_alt = async { + if !opts.check_links { + return None; + } + let raw = facts.google.mobile_alternate.as_deref()?; + let u = facts.link_base(&base).join(raw).ok()?; + Some((u.to_string(), fetch::probe_page(&probe, &u).await)) + }; + let cors = async { + if !opts.check_transport { + return None; + } + Some(fetch::cors_probe(&probe, &base, checks::CORS_PROBE_ORIGIN).await) + }; + let http_first_hop = async { + if !opts.check_transport { + return None; + } + let mut http = base.clone(); + let _ = http.set_scheme("http"); + Some( + fetch::first_hop( + &opts.user_agent, + opts.probe_timeout.min(Duration::from_secs(5)), + &http, + ) + .await, + ) + }; + let apple_touch = async { + if !opts.check_links { + return None; + } + let raw = facts.apple_touch_icon.as_deref()?; + let u = facts.link_base(&base).join(raw).ok()?; + Some(image_info(&probe, &u).await) + }; + let gpc_url = at("/.well-known/gpc.json"); + let gpc = fetch::probe_file(&probe, &gpc_url, Json); + let ( + (feed, bing, not_found_chain, indexnow), + (llms_subpath, agent_card, robots_chain), + (change_password, gpc, conditional, asset_encodings), + (statement, mobile_alternate, cors, http_first_hop, apple_touch_image), + ) = tokio::join!( + async { tokio::join!(feed, bing, not_found_chain, indexnow) }, + async { tokio::join!(llms_subpath, agent_card, robots_chain) }, + async { tokio::join!(change_password, gpc, conditional, asset_encodings) }, + async { tokio::join!(statement, mobile_alt, cors, http_first_hop, apple_touch) }, + ); + checks::SearchProbes { + llms_subpath, + agent_card: Some(agent_card), + change_password, + gpc: Some(gpc), + conditional, + asset_encodings, + statement, + mobile_alternate, + cors, + http_first_hop, + apple_touch_image, + manifest_icon: None, + robots_chain, + feed, + bing_site_auth: Some(bing), + not_found_chain, + chain_robots: Vec::new(), + indexnow, + } + }; + // ── 모든 독립 작업을 한 번에 ── let ( (sitemap, robots, sitemap_detail, site), @@ -642,14 +900,17 @@ impl Checker { assetlinks, ads_txt, markdown_version, + ard, + ai_catalog, ), not_found, links, - (http_version, encoding, redirect_chain, host_variant), + (http_version, encoding, redirect_chain, host_variant, chain_robots), ai_ua, (tls, url_variants, og_image, internal_samples), (manifest, favicon_image, static_asset), (canonical_target, hreflang_targets, external_css, page_weight), + mut search, ) = tokio::join!( sitemap_chain, files_fut, @@ -660,7 +921,20 @@ impl Checker { async { tokio::join!(tls_fut, variants_fut, og_fut, internal_fut) }, async { tokio::join!(manifest_fut, favicon_fut, asset_fut) }, async { tokio::join!(canonical_fut, hreflang_fut, css_fut, weight_fut) }, + search_fut, ); + search.chain_robots = chain_robots; + // manifest 에서 가장 크게 선언된 아이콘의 실제 크기 (manifest 를 받은 뒤라 따로 요청) + if let Some(Ok((_, Some(json)))) = &manifest + && let Some(manifest_url) = facts + .manifest + .as_deref() + .and_then(|m| facts.link_base(&base).join(m).ok()) + && let Some((declared, src)) = largest_icon(json) + && let Ok(u) = manifest_url.join(&src) + { + search.manifest_icon = Some((declared, image_info(&probe, &u).await)); + } let well_known = checks::WellKnown { favicon_ico, apple_touch_icon, @@ -669,6 +943,8 @@ impl Checker { apple_app_site_association, assetlinks, ads_txt, + ard, + ai_catalog, }; let extended = checks::Extended { @@ -684,6 +960,7 @@ impl Checker { manifest, favicon_image, static_asset, + search, now: std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) .map(|d| d.as_secs() as i64) @@ -725,6 +1002,84 @@ impl Checker { } } +/// 이미지를 받아 크기를 읽는다. +async fn image_info(probe: &reqwest::Client, url: &Url) -> Result { + fetch::fetch_bytes(probe, url, 2 * 1024 * 1024).await.map( + |(status, content_type, bytes, truncated)| { + let size = imagesize::blob_size(&bytes).ok(); + checks::ImageInfo { + url: url.to_string(), + status, + content_type, + bytes: bytes.len(), + truncated, + width: size.map(|s| s.width), + height: size.map(|s| s.height), + } + }, + ) +} + +/// manifest icons 중 가장 크게 선언된 것의 ("WxH", src). +fn largest_icon(json: &serde_json::Value) -> Option<(String, String)> { + json.get("icons")? + .as_array()? + .iter() + .filter_map(|i| { + let src = i.get("src")?.as_str()?.to_string(); + let size = i + .get("sizes")? + .as_str()? + .split_ascii_whitespace() + .next()? + .to_ascii_lowercase(); + let (w, h) = size.split_once('x')?; + Some((w.parse::().ok()? * h.parse::().ok()?, size, src)) + }) + .max_by_key(|(area, _, _)| *area) + .map(|(_, size, src)| (size, src)) +} + +/// www 변형 호스트를 요청해 본다. 변형이 없으면(IP·단일 레이블 호스트) None. +async fn probe_host_variant( + probe: &reqwest::Client, + url: Option, +) -> Option { + let url = url?; + let result = fetch::probe_status(probe, &url).await; + Some(checks::HostVariant { url, result }) +} + +/// 대상 페이지 연결에서 얻은 인증서로 TLS 항목 입력을 만든다. +fn tls_result( + scheme: &str, + cert: Option<&fetch::CertInfo>, +) -> Result, String> { + match (scheme, cert) { + ("https", Some(c)) => Ok(Some(c.clone())), + ("https", None) => Err("no peer certificate".to_string()), + _ => Ok(None), + } +} + +/// URL 경로가 .gif 로 끝나는지 (쿼리·조각 제외). +fn is_gif(url: &str) -> bool { + url.split(['?', '#']) + .next() + .unwrap_or_default() + .to_ascii_lowercase() + .ends_with(".gif") +} + +/// 분석할 표본을 고른다. 페이지가 순서를 바꿔 내려줘도 같은 결과가 나오도록 정렬·중복 제거 후 앞에서 `n` 개. +fn sample(urls: &[String], n: usize) -> Vec<&String> { + let mut v: Vec<&String> = urls.iter().collect(); + v.sort(); + v.dedup(); + v.truncate(n); + v +} + /// www 가 붙어 있으면 뗀, 없으면 붙인 루트 URL. IP·localhost·단일 레이블 호스트는 None. /// 표본 URL 선택: sitemap 우선, 부족하면 내부 링크. 같은 호스트, 대상 페이지 제외, 중복 제거. /// 반환: (URL 목록, sitemap 에서 온 수, 내부 링크에서 온 수) @@ -835,13 +1190,13 @@ async fn probe_encoding(ua: &str, timeout: Duration, url: &Url) -> Result