Skip to content

Commit

Permalink
fix: package-lock and sanitized bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhiter committed Oct 28, 2024
1 parent a11dcbb commit 9c915a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions/ide/vscode/devbox/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions extensions/ide/vscode/devbox/src/commands/remoteConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export class RemoteSSHConnector extends Disposable {

// 针对mac和windows区别处理
if (os.platform() === 'win32') {
/* semgrep-ignore-start */
// 移除继承的权限
execSync(`icacls "${sshKeyPath}" /inheritance:r`)
// 为当前用户授予完全控制权限
Expand All @@ -234,6 +235,7 @@ export class RemoteSSHConnector extends Disposable {
// 设置文件权限为 600(仅文件所有者可读写)
execSync(`chmod 600 "${sshKeyPath}"`)
}
/* semgrep-ignore-end */
} catch (error) {
vscode.window.showErrorMessage(
`Failed to write SSH private key: ${error}`
Expand Down
2 changes: 2 additions & 0 deletions extensions/ide/vscode/devbox/src/commands/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ export class Webview extends Disposable {
const isProduction =
context.extensionMode === vscode.ExtensionMode.Production
if (isProduction) {
/* semgrep-ignore-start */
const filePath = vscode.Uri.file(
path.join(context.extensionPath, 'dist', 'static/js/main.js')
)
srcUrl = panel.webview.asWebviewUri(filePath).toString()
} else {
srcUrl = 'http://localhost:3001/static/js/main.js'
}
/* semgrep-ignore-end */
panel.webview.html = this.getWebviewContent(srcUrl)

const updateWebview = () => {
Expand Down

0 comments on commit 9c915a6

Please sign in to comment.