Skip to content

fix(core): drop unused fromBase64 import — closes CodeQL alert #2#16

Merged
valehdba merged 1 commit into
mainfrom
fix/codeql-unused-import
May 10, 2026
Merged

fix(core): drop unused fromBase64 import — closes CodeQL alert #2#16
valehdba merged 1 commit into
mainfrom
fix/codeql-unused-import

Conversation

@valehdba
Copy link
Copy Markdown
Owner

Summary

Closes CodeQL alert #2 (js/unused-local-variable, severity note) — fromBase64 was imported but never referenced in packages/core/tests/crypto.test.ts.

Adjacent

The other open CodeQL alert was #3 (py/unused-import on server/alembic/env.py) for from passman import models. That import is intentional — it triggers SQLAlchemy declarative class registration so User / VaultItem / Session attach themselves to Base.metadata, which alembic reads on the next line via target_metadata = Base.metadata. Removing it would break migration generation. The line already carries # noqa: F401 for ruff, but CodeQL doesn't honour the noqa comment.

I've dismissed alert #3 as false positive via the GitHub API with the explanation above. After this PR merges, the open-alerts list should be empty.

Verification

  • npm test --workspace=@passman/core25 passed, 1 skipped (the 1 skipped is the network-bound integration test, same as before)

🤖 Generated with Claude Code

The import was left over from an earlier crypto-test refactor; nothing
references it. CodeQL flagged it as `js/unused-local-variable` (severity
note). Removing it closes the alert; tests still pass (25/26, 1 skipped
integration).

The other open alert (#3, `from passman import models` in alembic/env.py)
is a deliberate side-effect import that registers SQLAlchemy declarative
classes with `Base.metadata` — already marked `# noqa: F401` for ruff.
Dismissed via the GitHub UI as false-positive with the explanation, since
CodeQL doesn't honour the noqa comment.

After this commit the only known CodeQL alert is the dismissed one.
@valehdba valehdba merged commit 05ee70c into main May 10, 2026
7 checks passed
@valehdba valehdba deleted the fix/codeql-unused-import branch May 10, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant