
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Synchronise files piecemeal back and forth between a local cache and a remote SFTP server.
You have a client that sometimes needs to syncronise files to and from an SFTP server.
This model is simplistic, and will clobber any changes at the other end if a file with the same name exists. If you want to avoid that, you may be better off using Git or the like.
How to use::
import sftpsyncer
from sftpsyncer import syncagent
sagent = syncagent(hostname="remote_sagenth.example.com", host_port="1222",
username="theuser", key_path="/home/theuser/.sagenth/key",
local_root="/tmp/cache", remote_root="/upload_target")
# upload local files
sagent.upload_queue.add("myfile.txt")
sagent.upload_queue.add("docs/readme.txt")
sagent.push() # upload whether or not remote files exist
# auto-get remote files, reading from cache when available
fh1 = sagent.open("myfile.txt") # file is already local, return local fh
fh2 = sagent.open("remote.txt") # file is not local, transfer to local cache, return local fh
# exceptions
try:
fh3 = sagent.open("not_anywhere.txt")
except sftpsyncer.exceptions.FileNotFound as e:
print "File does not exist on local or remote"
try:
fh5 = sagent.open("ssh_server_unavailable.txt")
except sftpsyncer.exceptions.ConnectionError as e:
print "Remote SFTP service appears to be unavailable"
FAQs
Synchronise files between a local cache and an SFTP server
We found that sftpsyncer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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 flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.