fix(deps): resolve remaining Dependabot alerts#233
Conversation
60aa43b to
5b75cc2
Compare
|
| Filename | Overview |
|---|---|
| example/Gemfile | Removes direct activesupport gem declaration (resolving 3 Dependabot alerts), but also silently drops the != 7.1.0 exclusion that was documented as preventing build failures. |
| package.json | Bumps flatted resolution from >=3.3.4 to >=3.4.2 and adds explicit picomatch@npm:^4.0.2/^4.0.3 resolutions to 4.0.4 — correct Yarn Berry syntax, resolves targeted advisories. |
| yarn.lock | Lock file correctly reflects flatted@3.4.2 and picomatch@4.0.4 resolutions; existing picomatch@^2.x entries remain unaffected. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Dependabot Alerts] --> B{Alert Type}
B --> C[JS: flatted in yarn.lock]
B --> D[JS: picomatch v4 in yarn.lock\n2 advisories]
B --> E[Ruby: activesupport in Gemfile\n3 advisories]
C --> F[package.json: raise flatted\nresolution to >=3.4.2]
D --> G[package.json: add picomatch\nresolutions ^4.0.2 & ^4.0.3 → 4.0.4]
E --> H[Gemfile: remove direct\nactivesupport declaration]
F --> I[yarn.lock: flatted@3.4.2 ✓]
G --> J[yarn.lock: picomatch@4.0.4 ✓]
H --> K[Bundler resolves activesupport\nas transitive dep of cocoapods]
K --> L{Risk: activesupport 7.1.0\nexclusion also removed}
L -->|7.1.0 resolved| M[⚠️ Possible iOS build failure]
L -->|>7.1.0 resolved| N[✅ Build succeeds]
Prompt To Fix All With AI
This is a comment left during a code review.
Path: example/Gemfile
Line: 7-9
Comment:
**`activesupport 7.1.0` exclusion silently dropped**
The previous Gemfile held `gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'` with a comment that explicitly called out activesupport 7.1.0 as causing build failures. Removing the entire line also removes the `!= 7.1.0` guard. If Bundler resolves activesupport to exactly 7.1.0 (still technically possible if the cocoapods gem's own gemspec allows it), iOS CocoaPods-dependent builds could break. Consider adding a scoped re-exclusion if the 7.1.0 bug is still relevant:
```suggestion
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
```
This removes the lower-bound that was triggering Dependabot alerts (by no longer declaring a range that covers vulnerable versions) while still protecting against the known broken release.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(deps): resolve remaining Dependabot ..." | Re-trigger Greptile
| gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' | ||
| gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' | ||
| gem 'xcodeproj', '< 1.26.0' | ||
| gem 'concurrent-ruby', '< 1.3.4' |
There was a problem hiding this comment.
activesupport 7.1.0 exclusion silently dropped
The previous Gemfile held gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' with a comment that explicitly called out activesupport 7.1.0 as causing build failures. Removing the entire line also removes the != 7.1.0 guard. If Bundler resolves activesupport to exactly 7.1.0 (still technically possible if the cocoapods gem's own gemspec allows it), iOS CocoaPods-dependent builds could break. Consider adding a scoped re-exclusion if the 7.1.0 bug is still relevant:
| gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' | |
| gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' | |
| gem 'xcodeproj', '< 1.26.0' | |
| gem 'concurrent-ruby', '< 1.3.4' | |
| gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' | |
| gem 'activesupport', '!= 7.1.0' | |
| gem 'xcodeproj', '< 1.26.0' | |
| gem 'concurrent-ruby', '< 1.3.4' |
This removes the lower-bound that was triggering Dependabot alerts (by no longer declaring a range that covers vulnerable versions) while still protecting against the known broken release.
Prompt To Fix With AI
This is a comment left during a code review.
Path: example/Gemfile
Line: 7-9
Comment:
**`activesupport 7.1.0` exclusion silently dropped**
The previous Gemfile held `gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'` with a comment that explicitly called out activesupport 7.1.0 as causing build failures. Removing the entire line also removes the `!= 7.1.0` guard. If Bundler resolves activesupport to exactly 7.1.0 (still technically possible if the cocoapods gem's own gemspec allows it), iOS CocoaPods-dependent builds could break. Consider adding a scoped re-exclusion if the 7.1.0 bug is still relevant:
```suggestion
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
```
This removes the lower-bound that was triggering Dependabot alerts (by no longer declaring a range that covers vulnerable versions) while still protecting against the known broken release.
How can I resolve this? If you propose a fix, please make it concise.
Summary
flattedandpicomatchsoyarn.lockresolves to patched versionsactivesupportdeclaration fromexample/Gemfileso the example no longer advertises the vulnerable dependency directlyRoot cause
The repository already fixed the earlier JavaScript advisories in PR #231, but GitHub still reported 6 open alerts:
flattedinyarn.lockpicomatchinyarn.lock(2 advisories on the same vulnerable resolution)activesupportinexample/Gemfile(3 advisories on the direct gem declaration)Changes
package.jsonflattedresolution from>=3.3.4to>=3.4.2picomatch@npm:^4.0.2andpicomatch@npm:^4.0.3to4.0.4yarn.lockflattedto3.4.2picomatchentry to4.0.4example/Gemfileactivesupportgem declarationcocoapods,xcodeproj, andconcurrent-rubyconstraintsValidation
corepack yarn test --maxWorkers=2corepack yarn typecheckcorepack yarn lintpackages/purchasely/coverage/directory, not from the changed filesNotes
gh auth statussucceeds outside the sandbox via the macOS keyring. The earlier failure came from runningghinside the sandboxed environment, not from a broken GitHub login.