-
-
Notifications
You must be signed in to change notification settings - Fork 18
chore: apply @lavamoat/harden defaults
#335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a21d9c1
33790c1
0e21331
d3eb275
9659650
7ad86ba
755e4c3
8948c06
ca0e7ed
1ef1fe5
e541949
7a76691
d4f2e50
cd1ff8d
731b12b
d05cb00
341b3e4
c93e854
228265e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,10 +7,20 @@ compressionLevel: mixed | |
|
|
||
| enableGlobalCache: false | ||
|
|
||
| # Enable hardened mode to validate lockfile content against remote registries. | ||
| enableHardenedMode: true | ||
|
|
||
| # Disable Yarn's mirror feature to avoid writing to the global cache. | ||
| enableMirror: false | ||
|
Comment on lines
+13
to
+14
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though we disable the global cache above, Yarn still mirrors the local cache to the global cache (meaning it's still writing there), which is disallowed by the runner plugin in certain cases, e.g., when running |
||
|
|
||
| enableScripts: false | ||
|
|
||
| enableTelemetry: false | ||
|
|
||
| # Despite `enableGlobalCache` and `enableMirror` being `false`, Yarn is still | ||
| # writing to the global folder. | ||
| globalFolder: .yarn/global | ||
|
Comment on lines
+20
to
+22
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yarn always instantiates the PNPM linker class (I think?), which does some setup in the constructor including creating folders in the Yarn global folder. To get around this, the global folder is now stored locally. |
||
|
|
||
| logFilters: | ||
| - code: YN0004 | ||
| level: discard | ||
|
|
@@ -28,6 +38,7 @@ npmPreapprovedPackages: | |
| - '@metamask-previews/*' | ||
| - '@lavamoat/*' | ||
|
|
||
| # Protect the runtime of calls to "yarn run" scripts using a local plugin. | ||
| plugins: | ||
| - path: .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs | ||
| spec: 'https://raw.githubusercontent.com/LavaMoat/LavaMoat/main/packages/yarn-plugin-allow-scripts/bundles/@yarnpkg/plugin-allow-scripts.js' | ||
| - path: ./lavamoat/plugin-allow-scripts.js | ||
| - path: ./lavamoat/.runner-plugin.js | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ["SESSION", "SSH", "KEY", "TOKEN", "SECRET", "PASSWORD", "AUTH"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are environment variables that are removed before running a script based on partial key match I believe.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. more specifically - all env vars containing these words will be censored. |
||
Uh oh!
There was an error while loading. Please reload this page.