Repository navigation
Backend: clear high audit advisories (nest, pinata, stellar-sdk, joi) - #1695
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1566
Closes #1567
Closes #1568
Closes #1569
Changes
Lockfile changes were made with
npm update ... --package-lock-onlyandnpm uninstall --package-lock-only(nonode_modules, no scripts run), then checked withnpm audit --omit=dev --package-lock-only.@nestjs/platform-express,@nestjs/coreand@nestjs/commonmoved together from 11.2.7 to 11.2.11 within their^11ranges. This also movedmulterto 2.5.0 andbody-parserto 2.4.0. Neither is listed bynpm audit --omit=devany more.Backend/src/ipfs/ipfs.service.tsnow pins withfetchagainst Pinata's REST endpoint (/pinning/pinJSONToIPFS,pinata_api_key/pinata_secret_api_keyheaders, optionalPINATA_API_URL) and keeps the retry wrapper. A non-2xx response or a missingIpfsHashis a failure.@pinata/sdkwas removed frompackage.jsonand the lockfile, which removes the vulnerableaxioschain.ipfs.service.spec.tsandipfs.service.pinata.spec.tswere rewritten to mockfetchwith dummy credentials.@stellar/stellar-sdkmoved from 16.3.1 to 16.4.1 (within^16).follow-redirectswas updated to 1.16.1.joiwas already at 18.3.2 in the lockfile after the update; thepackage.jsonrange is unchanged.After these changes
npm audit --omit=devno longer lists@nestjs/platform-express,multer,body-parser,@pinata/sdk,axios,@stellar/stellar-sdk,follow-redirectsorjoi. Moderate findings remain for@nestjs/swagger,typeorm,glob,minimatchandjs-yaml; they are outside these issues.Not done / caveats
npm ci, build, unit tests or e2e suite. The acceptance criteria "Build and tests pass" and "Soroban tests pass" are unverified. I only rannpm auditagainst the lockfile and the lockfile-only commands above.joifix came from the lockfile update;package.jsonwas not changed, so a freshnpm installwithout the lockfile could still resolve an older 18.x.fetchspecs, not by a run against a mock HTTP server. The request shape follows Pinata's documented legacy JSON pin endpoint; I did not call it.npm uninstallbriefly reorderedlint-stagedinpackage.json; I restored the original order.