Skip to content

fix(security): replace kill-port pkg with native zero-dependency script - #7

Merged
itsbkm merged 1 commit into
FreeOpenSourcePOS:mainfrom
khaira777:fix/remove-kill-port
Jun 15, 2026
Merged

itsbkm merged 1 commit into
FreeOpenSourcePOS:mainfrom
khaira777:fix/remove-kill-port

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Removed kill-port npm package which was compromised in the Shai-Hulud 2.0 supply chain attack (versions 2.0.2 & 2.0.3 contained credential harvesting malware). The 2.0.1 pin with a caret (^) could auto-upgrade to malicious versions during npm install.

Replaced with kill-ports.js - a zero-dependency Node.js script using only Node built-ins (child_process, os) that works cross-platform on Windows (taskkill) and Mac/Linux (lsof/kill).

Removed kill-port npm package which was compromised in the Shai-Hulud 2.0
supply chain attack (versions 2.0.2 & 2.0.3 contained credential harvesting
malware). The 2.0.1 pin with a caret (^) could auto-upgrade to malicious
versions during npm install.

Replaced with kill-ports.js - a zero-dependency Node.js script using only
Node built-ins (child_process, os) that works cross-platform on
Windows (taskkill) and Mac/Linux (lsof/kill).
@itsbkm
itsbkm merged commit ff7afc8 into FreeOpenSourcePOS:main Jun 15, 2026
khaira777 added a commit that referenced this pull request Jul 5, 2026
…ts/discounts/tax/loyalty)

Integration tests (7 files, 123 assertions):
- Happy path: order→discount→bill→payment→completed
- Tax correctness: India GST calculation and recalculation
- Payment integrity: split payments, wallet double-spend, zero-amount rejection
- Order lifecycle: status transitions, cancel with PIN
- Bill reconciliation: discount sync, add-items sync
- Loyalty points: cashback, idempotency, wallet balance
- Discount edge cases: combined discounts, max limits, addon prices

Bug fixes:
- #3: Add-items filters cancelled items from total recalculation
- #4: Add-items syncs bill after updating order total
- #5: Cancel/restore round-off formula corrected
- #6: Discount endpoint wrapped in withTxn (race condition)
- #7: Infinity passes validation (NaN/isFinite check)
- #8: Missing amount defaults to remaining balance
- #9: Amount capped at remaining balance
- #11: Removing discount restores original tax
- #12: Add-items preserves order-level discount
- #13: Cancel/restore preserves order-level discount
- #14: Item-level discount checks max settings
- #15: Item-level discount syncs to bill
- #17: Cancel/restore wrapped in withTxn
- #20: Cashback calculated on discounted subtotal
- #23: Quantity/price validation on order creation

Shared test helper (tests/helpers/test-setup.ts):
- Extracts 40 lines of boilerplate per test file
- Provides: initTestDb, createApp, startServer, seed helpers, assert utilities

Co-Authored-By: Claude <[email protected]>
khaira777 pushed a commit that referenced this pull request Jul 6, 2026
fix(security): replace kill-port pkg with native zero-dependency script
itsbkm added a commit that referenced this pull request Aug 9, 2026
…5 paper size

Issue #220 item #5 (Medium, privacy): cloud_deletion_status_token is
a bearer-like token for polling a pending cloud account-deletion
request, persisted in settings but missing from the database export
redaction set — same exposure class as the cloud credentials already
redacted there.

Issue #220 item #6 (Low, compat): the Settings page's paper-size
selector was narrowed to thermal-only options (thermal58/thermal80).
'a4'/'a5' are no longer offered, but a browser that saved one before
the narrowing kept it in the persisted pos-settings store with no way
to reselect it. Added a v2 migration to that store (same pattern as
the existing v1 billGstin rename) that rewrites a4/a5 to thermal58.

Issue #220 item #7 (Low): added a dedicated test file for the Help &
Support ticket endpoint and its outbox delivery — submission,
idempotent retry by client_ticket_id, status polling, validation, and
the cloud-deletion-in-progress block path — which had no test
coverage at all before this. Also wires every new suite added across
this issue's commits (manual-tax-config, migration-v56-v57,
legacy-tax-pack-digest, support-ticket) into `npm test`.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.

2 participants