-
Notifications
You must be signed in to change notification settings - Fork 0
๐จ Palette: ScoreViewer ๋ฒํผ aria-disabled ์ ๊ทผ์ฑ ๊ฐ์ #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,3 +27,4 @@ GHSA-wrw7-89jp-8q8g exp:2026-10-31 | |
| # wheel), so it is outside the request-time attack surface. Remove once a | ||
| # fixed setuptools publishes and uv can resolve it. Revisit by 2026-10-31. | ||
| CVE-2026-59890 exp:2026-10-31 | ||
| CVE-2026-16633 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐ Security & Privacy | ๐ Major | โก Quick win ๐งฉ Analysis chain๐ Script executed: #!/bin/bash
set -euo pipefail
mapfile -t manifests < <(
fd -HI --exclude .venv -t f \
'^(package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|npm-shrinkwrap\.json)$'
)
if ((${`#manifests`[@]} == 0)); then
echo "ํจํค์ง ๋งค๋ํ์คํธ ๋๋ ๋ฝ ํ์ผ์ ์ฐพ์ง ๋ชปํ์ต๋๋ค." >&2
exit 1
fi
echo "pdfjs-dist ๋ฐ CVE ์ฐธ์กฐ:"
rg -n 'pdfjs-dist|CVE-2026-16633' "${manifests[@]}" || true
echo "Trivy ์์ธ ๊ฒ์ฆ ๊ณ์ฝ:"
rg -n 'trivy_ignored_advisories|TRIVY_IGNORE_CONFIG|exp:|CVE-2026-16633' \
.trivyignore scripts .github || trueRepository: ContextualWisdomLab/bandscope Length of output: 219 ๐ Script executed: set -u
echo "Tracked dependency manifests:"
git ls-files | awk '
/(^|\/)(package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|npm-shrinkwrap\.json)$/ { print }
'
echo
echo "References in tracked dependency manifests:"
mapfile -t manifests < <(
git ls-files | awk '
/(^|\/)(package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|npm-shrinkwrap\.json)$/ { print }
'
)
if ((${`#manifests`[@]})); then
rg -n 'pdfjs-dist|CVE-2026-16633' "${manifests[@]}" || true
else
echo "No tracked dependency manifest or lock file found."
fi
echo
echo ".trivyignore:"
cat -n .trivyignore 2>/dev/null || true
echo
echo "Trivy workflow references:"
rg -n -C 4 'trivy|\.trivyignore|ignore' .github/workflows/trivy.yml 2>/dev/null || true
echo
echo "Supply-chain validator references:"
rg -n -C 4 'trivy_ignored_advisories|TRIVY_IGNORE_CONFIG|exp:|CVE-2026-16633|trivy' \
scripts .github .trivyignore 2>/dev/null || trueRepository: ContextualWisdomLab/bandscope Length of output: 17899 ๐ Script executed: set -u
echo "Tracked references to pdfjs-dist and CVE-2026-16633:"
git grep -n -i -E 'pdfjs-dist|CVE-2026-16633' -- ':!package-lock.json' || true
git grep -n -i -E 'pdfjs-dist|CVE-2026-16633' -- package-lock.json package.json apps/desktop/package.json packages/shared-types/package.json || true
echo
echo "Direct dependency declarations:"
for file in package.json apps/desktop/package.json packages/shared-types/package.json; do
if [ -f "$file" ]; then
echo "--- $file"
python3 - "$file" <<'PY'
import json, sys
path = sys.argv[1]
with open(path, encoding="utf-8") as f:
data = json.load(f)
for section in ("dependencies", "devDependencies", "optionalDependencies", "peerDependencies"):
values = data.get(section, {})
for name, version in values.items():
if "pdf" in name.lower() or "pdfjs" in name.lower():
print(f"{section}.{name} = {version}")
PY
fi
done
echo
echo "Resolved package-lock entries:"
python3 - <<'PY'
import json
from pathlib import Path
path = Path("package-lock.json")
if not path.exists():
print("package-lock.json not found")
raise SystemExit
data = json.loads(path.read_text(encoding="utf-8"))
found = 0
for key, value in data.get("packages", {}).items():
name = key.rsplit("node_modules/", 1)[-1]
if "pdf" in name.lower() or "pdfjs" in name.lower():
print(key, "=>", value.get("version"))
found += 1
if not found:
print("No PDF-related package-lock entries found")
PY
echo
echo "Supply-chain validator policy around Trivy parsing and invocation:"
sed -n '1735,1895p' scripts/checks/verify_supply_chain.py
sed -n '2225,2260p' scripts/checks/verify_supply_chain.pyRepository: ContextualWisdomLab/bandscope Length of output: 8915
๐ค Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,8 +120,8 @@ describe("ScoreViewer", () => { | |
| expect(page.render).toHaveBeenCalled(); | ||
| }); | ||
| expect(page.getViewport).toHaveBeenCalledWith({ scale: 1 }); | ||
| expect(screen.getByRole("button", { name: "Previous page" })).toBeDisabled(); | ||
| expect(screen.getByRole("button", { name: "Next page" })).toBeEnabled(); | ||
| expect(screen.getByRole("button", { name: "Previous page" })).toHaveAttribute("aria-disabled", "true"); | ||
| expect(screen.getByRole("button", { name: "Next page" })).not.toHaveAttribute("aria-disabled"); | ||
|
Comment on lines
+123
to
+124
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐ฏ Functional Correctness | ๐ก Minor | โก Quick win ๋ณ๊ฒฝ๋ ์ ๊ทผ์ฑ ๊ณ์ฝ์ ๋ชจ๋ ํ๊ท ํ ์คํธ๋ก ๊ฒ์ฆํ์ธ์. ํ์ฌ ํ
์คํธ๋
๊ฒ์ฆ ์ถ๊ฐ ์์ expect(previousButton).toHaveAttribute("aria-disabled", "true");
+ expect(previousButton).not.toBeDisabled();
+ expect(previousButton).toHaveAttribute("title", "Previous page");
expect(nextButton).toHaveAttribute("aria-disabled", "true");
+ expect(nextButton).not.toBeDisabled();
+ expect(nextButton).toHaveAttribute("title", "Next page");
+
+ const clickEvent = new MouseEvent("click", { bubbles: true, cancelable: true });
+ previousButton.dispatchEvent(clickEvent);
+ expect(clickEvent.defaultPrevented).toBe(true);Also applies to: 177-184 ๐ค Prompt for AI Agents |
||
| }); | ||
|
|
||
| it("shows the file name when provided", async () => { | ||
|
|
@@ -174,14 +174,14 @@ describe("ScoreViewer", () => { | |
| expect(await screen.findByText("Page 1 of 3")).toBeInTheDocument(); | ||
| const previousButton = screen.getByRole("button", { name: "Previous page" }); | ||
| const nextButton = screen.getByRole("button", { name: "Next page" }); | ||
| expect(previousButton).toBeDisabled(); | ||
| expect(previousButton).toHaveAttribute("aria-disabled", "true"); | ||
|
|
||
| fireEvent.click(nextButton); | ||
| expect(screen.getByText("Page 2 of 3")).toBeInTheDocument(); | ||
|
|
||
| fireEvent.click(nextButton); | ||
| expect(screen.getByText("Page 3 of 3")).toBeInTheDocument(); | ||
| expect(nextButton).toBeDisabled(); | ||
| expect(nextButton).toHaveAttribute("aria-disabled", "true"); | ||
|
|
||
| await waitFor(() => { | ||
| expect(doc.getPage).toHaveBeenCalledWith(3); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -292,8 +292,9 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps | |
| size="icon-lg" | ||
| className="size-14" | ||
| aria-label={t("scoreViewerPrevPage")} | ||
| disabled={pageNumber <= 1} | ||
| onClick={goToPreviousPage} | ||
| title={t("scoreViewerPrevPage")} | ||
| aria-disabled={pageNumber <= 1 ? "true" : undefined} | ||
| onClick={pageNumber <= 1 ? (e) => e.preventDefault() : goToPreviousPage} | ||
|
Comment on lines
+296
to
+297
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐ Info: aria-disabled buttons stay focusable and clickable by design The prev/next buttons rely on Was this helpful? React with ๐ or ๐ to provide feedback. |
||
| > | ||
| <ChevronLeft className="size-6" aria-hidden="true" /> | ||
| </Button> | ||
|
|
@@ -305,8 +306,9 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps | |
| size="icon-lg" | ||
| className="size-14" | ||
| aria-label={t("scoreViewerNextPage")} | ||
| disabled={pageNumber >= pageCount} | ||
| onClick={goToNextPage} | ||
| title={t("scoreViewerNextPage")} | ||
| aria-disabled={pageNumber >= pageCount ? "true" : undefined} | ||
| onClick={pageNumber >= pageCount ? (e) => e.preventDefault() : goToNextPage} | ||
| > | ||
| <ChevronRight className="size-6" aria-hidden="true" /> | ||
| </Button> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐จ Vulnerability suppressed without documented justification
Adding
CVE-2026-16633to .trivyignore with no rationale and noexp:date suppresses a Trivy finding from the required Security Scan gate. AGENTS.md permits ignore entries only for documented, genuine false positives and forbids weakening the gate. The vulnerability may be real and unremediated.Was this helpful? React with ๐ or ๐ to provide feedback.