Skip to content
Open

Dev #91

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
67e57c6
refactor(main-processor): move constants file to a separate folder
Ashminita28 May 13, 2026
9d908e3
refactor(main-processor): change import file path in ipc test file
Ashminita28 May 13, 2026
6099b3b
test(main-processor): add html export helper tests
Ashminita28 May 13, 2026
34b6268
refactor(main-processor): change import file path in ipc & index file
Ashminita28 May 13, 2026
3e932ed
feat(main-processor): add html export functions
Ashminita28 May 13, 2026
20f44a7
refactor(main-processor): change import file path in cli function
Ashminita28 May 13, 2026
4cab7cc
test(drag-drop): add test case for drag and drop functionality
Ashminita28 May 18, 2026
7bf10cd
feat(drag-drop): add dropped path extraction logic for drop
Ashminita28 May 18, 2026
ebae11b
feat(preload): add dropped file path helper
Ashminita28 May 19, 2026
3c11ba2
feat(renderer): integrate drag and drop file opening with App.tsx
Ashminita28 May 19, 2026
efee407
fix(renderer): add file path fallback to fix null file path issue
Ashminita28 May 19, 2026
bb9d16e
feat(shared): add md path regex to shared constants
Ashminita28 May 19, 2026
3636a09
Merge branch 'dev' into feature/export
Ashminita28 May 20, 2026
a72928c
fix(renderer): map indices on data transfer mock to fix drag drop fai…
Ashminita28 May 20, 2026
d66de8f
refactor(shared): add export html and pdf IPC constants
Ashminita28 May 20, 2026
752ba56
refactor(main-processor): add export html menu use
Ashminita28 May 20, 2026
8e4b634
feat(preload): add export html ipc handler
Ashminita28 May 20, 2026
82c6c5b
feat(shared): add html export and saved dialog show markdown apis
Ashminita28 May 20, 2026
dc05460
feat(renderer): connect export html to renderer
Ashminita28 May 20, 2026
ed8e99b
Merge pull request #63 from mindfiredigital/feature/drag-drop
mind-murtaza May 21, 2026
b03d6ef
test(docx): add test case for docx export feature
Ashminita28 May 21, 2026
cd601d1
feat(main): add docx and pdf export functionality
Ashminita28 May 21, 2026
500ee87
feat(shared): add export constants
Ashminita28 May 21, 2026
d74cb9f
feat(renderer): integrate export docx and pdf to renderer
Ashminita28 May 21, 2026
6e5f620
feat(preload): add ipc for export docx and pdf and fix html ipc renderer
Ashminita28 May 21, 2026
cba01e8
chore(electron-config): add roll up externals for docx export depende…
Ashminita28 May 21, 2026
9bd61b4
Merge branch 'dev' into feature/export
Ashminita28 May 21, 2026
b78f2f2
docs: change docs preview image
Ashminita28 May 21, 2026
360e525
docs: add application demo in hero section
Ashminita28 May 22, 2026
d2f8c1b
feat(shared): add updater constant and function type
Ashminita28 May 22, 2026
c6f62fb
feat(preload): add update available and download IPC bindings
Ashminita28 May 22, 2026
178ee79
feat(main-processor): add auto updator to electron window
Ashminita28 May 22, 2026
23d8a30
feat(renderer): add updation banner for updates in renderer
Ashminita28 May 22, 2026
f7bf4b8
Merge pull request #67 from mindfiredigital/feature/auto-updater
mind-murtaza May 22, 2026
38dac59
Merge pull request #66 from mindfiredigital/docs/branding-docs
mind-murtaza May 22, 2026
5daf2b4
Merge branch 'dev' into feature/export
Ashminita28 May 23, 2026
dfc6097
fix(export): add inline images before building the PDF document to av…
Ashminita28 May 23, 2026
6cb167e
fix(ipc): add sender and path validation in export ipc
Ashminita28 May 23, 2026
f6a77b5
fix(regex): handle single quoted src attributes in export image matching
Ashminita28 May 23, 2026
8f4101c
Merge pull request #64 from mindfiredigital/feature/export
mind-murtaza May 23, 2026
faa454d
refactor(app): move drag-drop and reader toolbar jsx to components fo…
Ashminita28 May 25, 2026
6a9f4e3
refactor(app): separate reusable hooks from app.tsx
Ashminita28 May 25, 2026
ebfa570
refactor(types): separate hook and component types
Ashminita28 May 25, 2026
b537885
Merge pull request #69 from mindfiredigital/refactor/app-structure
mind-murtaza May 25, 2026
7cdeb3f
test(renderer): add failure test case to check before purification ac…
Ashminita28 May 25, 2026
c472b33
test(renderer): add dom purification test case
Ashminita28 May 25, 2026
09e68d7
Merge pull request #70 from mindfiredigital/test/dom-purify
mind-murtaza May 25, 2026
b12750a
test(main-processor): add test case for folder wide search helpers
Ashminita28 May 25, 2026
1cb7653
fix(ipc): ipc path traversal risk
Ashminita28 May 26, 2026
9f4552c
test(ipc): add path validator test case
Ashminita28 May 26, 2026
d732e34
test(ipc): fix cross platform path validation failure in CI
Ashminita28 May 26, 2026
efa8044
fix(renderer): prevent duplicate shiki instances and excape heading html
Ashminita28 May 26, 2026
e934a1d
docs: swap mermaid with katex
Ashminita28 May 26, 2026
7e933c4
Merge pull request #72 from mindfiredigital/fix/security-ipc-path-tra…
mind-murtaza May 26, 2026
f05593e
Merge pull request #74 from mindfiredigital/perf/shiki-singleton
mind-murtaza May 26, 2026
38c118b
fix(main-processor): validate Os file path
Ashminita28 May 26, 2026
bc7cd6f
feat(watcher): add unlink and error handler in file watcher
Ashminita28 May 26, 2026
e617f6a
Merge branch 'dev' into feature/folder-search
Ashminita28 May 26, 2026
fe62280
feat(main-processor): add debounce timer and its test case
Ashminita28 May 26, 2026
5fd185d
fix(toc): fix alignment of sidebar contents & deep collapsing
Ashminita28 May 27, 2026
683374c
fix: fix TOC sidebar auto-collapse logic and matching tests
Ashminita28 May 27, 2026
91fa58c
test(toc): refactor & toc tests for toc extraction using marked AST
Ashminita28 May 27, 2026
db4b62a
refactor(toc): update toc extraction from regex methor to marked AST …
Ashminita28 May 27, 2026
9ff5ed0
test(main-processor): mock electron app in setup
Ashminita28 May 27, 2026
4deef58
test(main-processor): add recursive depth limit test case
Ashminita28 May 27, 2026
91ff7cd
refactor(main-processor): add depth limit to avoid stack failures on …
Ashminita28 May 27, 2026
121a1aa
chore: add coderabbit configuration
Ashminita28 May 28, 2026
ab8e9c3
docs: add ipc api and architecture docs
Ashminita28 May 28, 2026
3a3fab3
test(file): add test for debounce cleanup afer file unwatch
Ashminita28 May 28, 2026
0e1ac62
feat: replace default vite icon, update prettier ignore, add prepush
Ashminita28 May 28, 2026
9e186a5
feat(ci): add dependency audit and filesystem vulnerability scan in ci
Ashminita28 May 28, 2026
c1cf730
refactor(ci): setup pnpm before node
Ashminita28 May 28, 2026
a0778f2
chore: update package to fix high vulnerabiliy
Ashminita28 May 28, 2026
bb99e05
test(settings): add validation tests for validate settings
Ashminita28 May 28, 2026
7f57594
feat(shared): add app settings type and add type module to shared types
Ashminita28 May 28, 2026
384fcbc
fix(settings): fix setting font size test
Ashminita28 May 28, 2026
98c8918
refactor(coderabbit): update coderabbit configuration
Ashminita28 May 28, 2026
4a93345
feat(settings): add settings ipc handler & functionality in main proc…
Ashminita28 May 28, 2026
7e815c2
refactor(shared): add settings menu constants & update markdown API
Ashminita28 May 28, 2026
12498ef
feat(renderer): connect settings feature to renderer
Ashminita28 May 28, 2026
ffd9cd2
feat(main-processor): add menu missing Theme submenu and dev tools hi…
Ashminita28 May 29, 2026
5b3f66f
refactor(shared): modify ipc type for menu event
Ashminita28 May 29, 2026
ca53017
feat(renderer): add os theme detection & connect theme submenu to ren…
Ashminita28 May 29, 2026
d962082
Merge pull request #80 from mindfiredigital/chore/coderabbit
mind-murtaza May 29, 2026
1873167
fix(export): fix embedding image issue
Ashminita28 May 31, 2026
83ac13a
fix: code rabbit issues
Ashminita28 May 31, 2026
8fed99d
feat: add unsigned install notice
Ashminita28 May 31, 2026
3b16643
fix(ci): change pnpm version and add secific version to security
Ashminita28 May 31, 2026
f325be6
fix(ci): fix pipeline issue by removing defined version of pnpm
Ashminita28 May 31, 2026
3583cc1
fix(security): update trivy action version
Ashminita28 May 31, 2026
64b6baf
refactor: modify test folder name
Ashminita28 May 31, 2026
7472b7b
feat: add folder serach types & props
Ashminita28 May 31, 2026
6373040
feat(renderer): add folder search menu events
Ashminita28 May 31, 2026
edc99ea
feat(main-processor): add folder search ipc handler and main processor
Ashminita28 May 31, 2026
be79e36
feat(renderer): add folder search to search bar component
Ashminita28 May 31, 2026
ee8ad9b
fix(test): fix name in test file
Ashminita28 May 31, 2026
c6a18d5
fix: fix error handling and props passing issues
Ashminita28 May 31, 2026
fe9e236
test: add failure test case
Ashminita28 May 31, 2026
d29a2a5
fix: menu events hook
Ashminita28 May 31, 2026
5276c12
refactor(renderer): fix folder search state and TOC handling
Ashminita28 May 31, 2026
663e9fc
Merge pull request #87 from mindfiredigital/docs/branding-docs
mind-murtaza May 31, 2026
67d9232
test(settings): add test validate all settings fields
Ashminita28 Jun 1, 2026
1a442a4
test(export): add temp directory clean up
Ashminita28 Jun 1, 2026
f94d8e2
refactor(settings): remove fallback process.cwd()
Ashminita28 Jun 1, 2026
039c105
refactor(types): separate default settings type, modify import
Ashminita28 Jun 1, 2026
8d58a35
refactor(settings): add keyboard dismissal and focus management
Ashminita28 Jun 1, 2026
618b7dd
fix(preload): add constrain onMenuEvent to known menu channels
Ashminita28 Jun 1, 2026
952d91e
fix(settings): add atomic writes to prevent settings corruption
Ashminita28 Jun 1, 2026
06f2341
fix(search): invalidate pending searches & rename test sentence
Ashminita28 Jun 1, 2026
0bad2a8
fix(search): remover folder search UI from depending on document sear…
Ashminita28 Jun 1, 2026
2fed732
fix(search): fix folder search query propagation and race conditions
Ashminita28 Jun 1, 2026
41c4480
Merge branch 'fix/system-hardening' into feature/folder-search
Ashminita28 Jun 1, 2026
4d3fb41
fix: code rabbit issues
Ashminita28 Jun 1, 2026
e4885fc
Merge pull request #78 from mindfiredigital/fix/system-hardening
mind-murtaza Jun 1, 2026
bafd9ab
Merge pull request #88 from mindfiredigital/feature/folder-search
mind-murtaza Jun 1, 2026
9e38862
fix(ci): remove pnpm package version
Ashminita28 Jun 1, 2026
40c76d5
fix(update): return an unsubscribe handle for update notifications
Ashminita28 Jun 1, 2026
8c22700
fix(search): add cleanup on unmount to prevent state updates
Ashminita28 Jun 1, 2026
6b0dc4d
fix(export): make sanitizeCss fixed point to prevent reconstitution o…
Ashminita28 Jun 1, 2026
64fefc6
fix(export): add inline images before DOCX conversion
Ashminita28 Jun 1, 2026
11d7cbf
fix(heading): fix marked heading to render inline markdown and keep T…
Ashminita28 Jun 1, 2026
3834063
Revert "fix(ci): remove pnpm package version"
Ashminita28 Jun 1, 2026
6dc7123
Merge branch 'dev' into fix/system-hardening
Ashminita28 Jun 1, 2026
391137b
fix: ipc handler clean up & package override issue
Ashminita28 Jun 1, 2026
6034207
fix(settings): add window api mock and fix settings test
Ashminita28 Jun 1, 2026
f7e84b8
chore: update pnpm lock file
Ashminita28 Jun 1, 2026
c53bf0f
fix: add ipc gaurd,and return promise
Ashminita28 Jun 1, 2026
60b5a47
fix: remove husky run in release
Ashminita28 Jun 1, 2026
1d6711a
fix(shortcuts): fix key bord shortcut
Ashminita28 Jun 1, 2026
790f60b
fix(security): allow watching explicitly opened markdown file
Ashminita28 Jun 1, 2026
7d8315e
feat(tab-bar): add plus button to open multiple file from tab bar
Ashminita28 Jun 2, 2026
51024b2
fix(watcher): add timer in watcher ready and error
Ashminita28 Jun 2, 2026
d9cbfe7
feat(renderer): add aria labels to components
Ashminita28 Jun 2, 2026
f915df4
test(tab-bar): fix tab bar component test
Ashminita28 Jun 2, 2026
0798859
feat(renderer): add error boundary for app crash fallback
Ashminita28 Jun 3, 2026
a70fb17
fix(renderer): add missing id and fix broken tailwind class
Ashminita28 Jun 3, 2026
09ce480
Merge pull request #90 from mindfiredigital/fix/system-hardening
mind-murtaza Jun 3, 2026
d729462
fix(coderabbit): remove space in path declaration
Ashminita28 Jun 3, 2026
2f359bc
fix(exportPDF): avoid loading large base64 inlined HTML via a data: U…
Ashminita28 Jun 3, 2026
d752aa6
fix(ipc): remove hardcoded slash for folder search
Ashminita28 Jun 3, 2026
88e0ac4
feat(menu): add checked option in theme switch in window
Ashminita28 Jun 3, 2026
a0c8999
fix(settings): avoid array values from passing object check
Ashminita28 Jun 3, 2026
2bea6fc
fix(docs): remove duplicate heading
Ashminita28 Jun 3, 2026
f828d9a
fix(shiki): handle shiki error
Ashminita28 Jun 3, 2026
6f50eec
fix(toc): fix TOC anchor IDs when headings repeat
Ashminita28 Jun 3, 2026
3930380
fix(renderer): add window api guard
Ashminita28 Jun 3, 2026
82f2a2a
fix(updater): prevent autoUpdater listener duplication when recreatin…
Ashminita28 Jun 3, 2026
5ee99b9
fix(index): extend content policy
Ashminita28 Jun 3, 2026
28929c9
fix(ipc-validation): remove window path check from only C: drive to a…
Ashminita28 Jun 3, 2026
04a8a48
fix(renderer): prevent post unmount state updates in useFilePersistence
Ashminita28 Jun 3, 2026
15495b7
fix(export): wait for the browser window to close before deleting the…
Ashminita28 Jun 3, 2026
0c5992f
fix(renderer): fix shared global heading id state across render passes
Ashminita28 Jun 3, 2026
e621a5f
Merge pull request #92 from mindfiredigital/fix/system-hardening
mind-murtaza Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 236 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
# ---------------------------------------------------------------------------
# CodeRabbit Configuration for mindfiredigital/markdown-reader
#
# Stack : Electron + React + TypeScript + Vite + Tailwind CSS
# Tooling : pnpm + Vitest + ESLint + Prettier + electron-vite
# Pattern : Electron desktop app monorepo with main, preload, renderer, shared packages, and Docusaurus docs
#
# Validate : https://docs.coderabbit.ai/configuration/yaml-validator
# Reference: https://docs.coderabbit.ai/reference/configuration
# ---------------------------------------------------------------------------

language: 'en-US'

tone_instructions: 'Senior Electron/React/TS reviewer. Be concise. Prioritise IPC/preload boundaries, markdown sanitisation, local file safety, a11y, tests, packaging, and CI. Flag real risks; suggest concrete fixes.'

early_access: false

reviews:
profile: 'assertive'
request_changes_workflow: true

high_level_summary: true
high_level_summary_instructions: >
Summarise the PR in concise bullets grouped by:
Electron main/preload, renderer UI, markdown rendering, shared packages,
tests, tooling/CI, docs, and packaging. End with "Breaking changes: None"
unless a public API, IPC contract, file behaviour, shortcut, or packaging
change is breaking.
high_level_summary_in_walkthrough: false

collapse_walkthrough: false
changed_files_summary: true
sequence_diagrams: true
estimate_code_review_effort: true
assess_linked_issues: true
related_issues: true
related_prs: true

suggested_labels: true
auto_apply_labels: false
suggested_reviewers: true
auto_assign_reviewers: false

commit_status: true
fail_commit_status: false
review_status: true
review_details: true

poem: false
in_progress_fortune: false

auto_review:
enabled: true
base_branches:
- main
- dev

path_filters:
- '!out/**'
- '!dist/**'
- '!build/**'
- '!coverage/**'
- '!release/**'
- '!node_modules/**'
- '!docs/.docusaurus/**'
- '!docs/build/**'
- '!pnpm-lock.yaml'
- '!**/*.snap'
- '!**/__snapshots__/**'
- '!**/*.{png,jpg,jpeg,gif,webp,ico,icns,mp4,zip}'

path_instructions:
- path: 'apps/main-processor/src/**/*.ts'
instructions: |
Review as Electron main-process code.
- IPC handlers must use shared constants and validate renderer input.
- File/folder access must guard path traversal, missing files, permissions, symlinks, and deleted watched files.
- Watchers, menus, dialogs, and IPC listeners must be cleaned up.
- Do not expose Node/Electron internals or unrestricted filesystem access.
- Export/update/download flows must sanitize content, close resources, and avoid executing embedded scripts.

- path: 'apps/preload/src/**/*.ts'
instructions: |
Review as a strict preload boundary.
- Expose only typed contextBridge APIs, never raw ipcRenderer.
- Use shared IPC constants and shared payload/result types.
- Listener methods must return unsubscribe functions.
- Reject broad channel names, arbitrary invoke/send wrappers, and any-typed payloads.

- path: 'apps/renderer/src/**/*.{ts,tsx}'
instructions: |
Review as React renderer code.
- Keep components typed, accessible, keyboard-friendly, and resilient to missing preload APIs.
- Effects must have correct dependencies and cleanup.
- Handle loading, empty, error, stale-response, and rejected-promise states.
- Do not import Node-only modules into renderer code.
- Avoid unnecessary derived state, unsafe globals, and broad any types.

- path: 'apps/renderer/src/**/{renderer,markdown,utils}/**/*.{ts,tsx}'
instructions: |
Review markdown rendering carefully.
- Sanitize raw HTML, links, images, Mermaid, KaTeX, anchors, and exported content.
- Block script execution, javascript: URLs, unsafe inline handlers, and unsafe local file references.
- Heading IDs and TOC entries must be stable and collision-safe.
- Mermaid/KaTeX/code highlighting failures should not break the whole document.
- Add tests for unsafe HTML, malformed markdown, links, images, code blocks, Mermaid, and KaTeX when changed.

- path: 'apps/renderer/src/**/*.{css,tsx}'
instructions: |
Review UI, theme, and accessibility.
- Interactive controls need semantic elements, visible focus, and keyboard access.
- Theme changes must preserve readable contrast in light and dark modes.
- Markdown prose must remain readable for tables, code, blockquotes, links, lists, and images.
- Prefer existing tokens/classes over ad hoc inline styling.

- path: 'packages/shared-*/src/**/*.ts'
instructions: |
Review shared package contracts.
- IPC constants, menu constants, shortcuts, and shared types are public contracts.
- New IPC constants must have handler, preload wrapper, renderer usage, and tests.
- Breaking type/API changes must be called out clearly.
- Prefer precise types over string/object/unknown/any shapes.

- path: '**/*.{test,spec}.{ts,tsx}'
instructions: |
Review tests.
- Cover success and failure paths, especially IPC, filesystem, markdown rendering, search, settings, tabs, and exports.
- Use isolated temp directories for disk tests and clean them up.
- Mock Electron/preload APIs explicitly.
- Prefer Testing Library user-event and getByRole for UI tests.

- path: '.github/workflows/**/*.yml'
instructions: |
Review CI/CD.
- Actions should use version tags, not @main.
- Secrets must use ${{ secrets.* }} and never be hardcoded.
- CI should install with pinned pnpm, then run lint, typecheck, tests, build, and package checks.
- Security scans should fail for high/critical findings unless justified.

- path: 'electron.vite.config.ts'
instructions: |
Review Electron/Vite build separation.
- Main, preload, and renderer entry points must stay separated.
- Main/preload should externalize Node/Electron dependencies where needed.
- Renderer must not bundle Node-only or Electron main-process modules.
- Production sourcemap/minify/external settings must be intentional.

- path: 'electron-builder.ts'
instructions: |
Review packaging.
- Check appId, productName, files, asar, icons, targets, file associations, artifact names, and publish settings.
- Exclude source-only, test, coverage, cache, and map files from releases.
- Signing/notarisation/update config must not hardcode secrets.
- Platform targets should match expected Windows, macOS, and Linux release formats.

- path: '**/package.json'
instructions: |
Review scripts and dependencies.
- Scripts for lint, typecheck, test, coverage, build, and dist must fail on errors.
- Dependencies should live in the package that imports them.
- Runtime imports must not be placed only in devDependencies.
- Electron, Vite, React, TypeScript, Tailwind, and testing upgrades need compatibility attention.

- path: 'tsconfig*.json'
instructions: |
Review TypeScript config.
- Keep strict type safety enabled.
- Module, target, moduleResolution, paths, and includes must match electron-vite and workspace boundaries.
- Renderer configs should include DOM types; main/preload should not accidentally depend on browser globals.

- path: 'eslint.config.*'
instructions: |
Review lint config.
- TypeScript parsing should cover workspace TS/TSX files.
- React hooks rules must apply to renderer code.
- Avoid disabling rules that hide runtime errors or weaken type safety.

- path: 'docs/**/*.{md,mdx,ts,tsx}'
instructions: |
Review docs.
- Docs must match current shortcuts, markdown support, export behaviour, install steps, and privacy/offline claims.
- Code blocks need language tags.
- Links and images should resolve.
- Docusaurus components must guard browser-only APIs during static build.

- path: 'pnpm-workspace.yaml'
instructions: |
Review workspace config.
- Workspace globs must intentionally include apps, packages, and docs.
- allowBuilds entries should stay minimal and justified.

tools:
eslint:
enabled: true
markdownlint:
enabled: true
actionlint:
enabled: true
gitleaks:
enabled: true
htmlhint:
enabled: true
checkov:
enabled: true
languagetool:
enabled: true
enabled_rules:
- 'OXFORD_COMMA'
- 'EN_QUOTES'
- 'COMMA_PARENTHESIS_WHITESPACE'
disabled_categories:
- 'TYPOGRAPHY'
yamllint:
enabled: true
ast-grep:
essential_rules: true
biome:
enabled: false

chat:
auto_reply: true

knowledge_base:
opt_out: false
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns:
- 'README.md'
- 'CONTRIBUTING.md'
- 'SECURITY.md'
- 'docs/**/*.md'
- 'docs/**/*.mdx'
learnings:
scope: auto
37 changes: 33 additions & 4 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
node-version: 22

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -40,4 +38,35 @@ jobs:
run: pnpm test:coverage

- name: Build Electron app
run: pnpm dist
run: pnpm dist

security:
name: Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: pnpm audit
run: pnpm audit --audit-level=high

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
scan-ref: .
severity: CRITICAL,HIGH
format: table
exit-code: 1
37 changes: 33 additions & 4 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
node-version: 22

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -40,4 +38,35 @@ jobs:
run: pnpm test:coverage

- name: Build Electron app
run: pnpm dist
run: pnpm dist

security:
name: Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: pnpm audit
run: pnpm audit --audit-level=high

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
scan-ref: .
severity: CRITICAL,HIGH
format: table
exit-code: 1
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:

permissions:
contents: write

env:
HUSKY: 0

jobs:
# add change set
Expand Down
46 changes: 39 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
node_modules
dist
build
# Dependencies
node_modules/

# Build outputs
out/
dist/
build/
release/
*.tgz
.vite/

# Electron builder
.cache/

# Environment
.env
out
coverage
release
.vite/
.env.local
.env.*.local

# Logs
*.log
npm-debug.log*
pnpm-debug.log*

# OS artifacts
.DS_Store
Thumbs.db

# IDE
.vscode/
.idea/
*.swp
*.swo

# Test coverage
coverage/

# Docusaurus
docs/.docusaurus/
docs/build/
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm test
Loading
Loading