Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/liximomo/vscode-sftp
Very simple and intuitive and works.
Ctrl+Shift+P
on Windows/Linux open command palette, run SFTP: config
command.Note1 :A command must run with a target(file or directory). When Running command within command palette it will ask you to select a folder.
Note2 :Sync commands will only be available to a directory. Try not to bind shortcuts to those commands because there is no way to figure out the target directory.
Command | Description | Detailed description |
---|---|---|
SFTP: Config | create a new config file at workspace root | see below for an explained config file |
SFTP: Upload | upload file/directory | copies selected files from the local to the remote directory, overwriting the remote ones. Files that are only present on the remote side won't be affected. Files that are only present on the local side will be created remotely |
SFTP: Download | download file/directory | same as above, but in the opposite direction |
SFTP: Sync To Remote | sync local directory to remote | only available for directories. Copies common files (that exist on both sides) from local dir to remote, overwriting destination. If syncMode is set to full, files that exist only on the local side will be created remotely, and files that exist only on the remote side will be deleted |
SFTP: Sync To Local | sync remote directory to local | same as above, but in the opposite direction |
{
"host": "host",
"username": "username",
"password": "password",
"remotePath": "/remote/workspace",
}
You can also use an array of configs in the config file.
[
{
"context": "/workspace/a",
"host": "host",
"username": "username",
"password": "password",
"remotePath": "/remote/workspace/a",
},
{
"context": "/workspace/b",
"host": "host",
"username": "username",
"password": "password",
"remotePath": "/remote/workspace/b",
}
]
{
// an path relative to the root path of a vsode workspace, default to '.'
context: '.',
/************************
* CONNECTION PARAMETERS *
************************/
host: "host",
port: 22,
username: "username",
password: "password",
protocol: "sftp", // sftp or ftp
/**
* string - Path to ssh-agent's UNIX socket for ssh-agent-based user authentication.
* Windows users: set to 'pageant' for authenticating with Pageant or (actual) path to a cygwin "UNIX socket.
*/
agent: null,
privateKeyPath: null, // absolute path to user private key
passphrase: null,
passive: false, // ftp passive mode
// try interactive authentication, useful for dual auth.
// (requires the server to have keyboard-interactive authentication enabled)
interactiveAuth: true,
/*******************************
* SYNCING, UPLOAD AND DOWNLOAD *
*******************************/
// The corresponding remote path of the context
remotePath: "/",
uploadOnSave: false,
/**
* available values: update | full
* update: sync existing files only (it only affects files that exist on both sides)
* full: sync existing files + remove files deleted from the source that are still present at
* the destination + create files that exist on the source and are missing at the destination
* If you want just to sync existing files and add missing files, use the `upload` command!
* Note: this option only affects the `Sync to remote/local` commands, not `Download` or `Upload`
*/
syncMode: 'update',
/**
* Detailed example of how sync/upload/download work. Assume we have the following directories:
*
* source-dir
* |-s1.txt (file that exists only at source)
* |-common.txt
* dest-dir
* |-d1.txt (file that exists only at destination)
* |-common.txt (common file between source-dir and dest-dir)
*
* DOWNLOAD and UPLOAD are copy operations from one side to the other. They only overwrite and create
* files on the destination, without deleting anything.
*
* If we download source-dir to dest-dir, the dest-dir will be:
* dest-dir
* |-s1.txt (copied from source)
* |-d1.txt
* |-common.txt (overwritten with the contents of the same file from source-dir)
*
* The effect of SYNC operations depends on the value of syncMode. With syncMode: 'update', only common
* files are copied from one side to the other. With syncMode: 'full', the destination will be modified
* to have the same set of files as the source (which implies deleting files that only exist on the
* destination and creating files that only exist at source).
*
* If we sync source-dir to dest-dir using syncMode: 'update', dest-dir wil be:
* dest-dir
* |-d1.txt
* |-common.txt (overwritten with the contents of the same file from source-dir)
*
* If we sync source-dir to dest-dir using syncMode: 'full', dest-dir wil be:
* dest-dir
* |-s1.txt (created, because it didn't exist on destination)
* |-common.txt (overwritten with the contents of the same file from source-dir)
* and d1.txt is deleted because it didn't exist at source
*/
/**
* array of glob patterns that will be appended to `context` and `remotePath`
* Note: the ** sequence matches a sequence of zero or more files and directories
* examples:
*/
// "**/.vscode" means every file or directory with name .vscode, at any depth in the file tree
// 'a/b/.vscode' matches
// 'a/b/.vscode/c.txt' does NOT match
// "**/.vscode/**" means every file or directory under a .vscode dir, at any depth in the file tree
// 'a/b/.vscode/c.txt' matches
// 'a/b/.vscode/c/d.txt' matches
// 'a/b/.vscode/e' matches
ignore: [
"**/.vscode/**",
"**/.git/**",
"**/.DS_Store"
],
/**
* Watching external file changes(create and remove only), such as compile/build output
* or git branch switching. Also useful for automatically creating/deleting remote files when
* creating/deleting them in vscode
* Watcher will be disabled when files is set to false or both autoDelete and autoUpload are set to false
*/
watcher: {
/**
* available value: false or a glob pattern
* - false: disable watcher
* - string containing a glob pattern: describes files that will be watched
*/
files: false,
/**
* available value: true or false
* whether or not to auto upload created files (e.g. created in vscode or other external apps)
*/
autoUpload: true,
/**
* available value: true or false
* whether or not to auto delete removed files (e.g. removed manually from vscode or the command line)
*/
autoDelete: true
}
}
ENFILE: file table overflow ...
MacOS has a harsh limit on the number of open files. Run these commands:
echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.