
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
seafile-api
Advanced tools
seafile-api
is a small npm module for accessing the Seafile Web API and thus controlling a Seafile instance from within a Node.js application.
Though there are quite many API methods, at the moment this module just implements a small subset of the available functions.
$ npm install seafile-api
You will need a valid access token to make API requests. See the API docs for further information on how to obtain a token: Web API | Quick Start. At the moment, this module does not support obtainment of access tokens.
var SeafileAPI = require('seafile-api');
var sf = new SeafileAPI('https://cloud.seafile.com', 'accesstoken123456789');
See the official API docs for detailed information about the methods and used parameters. Default values are used if optional parameters are not set.
sf.listAccounts({
start: 0,
limit: 100,
scope: 'DB'
}, function(err, accounts, httpcode){
if(err) console.error('Error:', err);
console.log(accounts);
});
sf.getAccountInfo('johndoe@example.com', function(err, body, httpcode){
console.log(body);
});
sf.createAccount({
email: 'johndoe@example.com',
password: 'foobar123',
is_staff: 0,
is_active: 1
}, function(err, data, httpcode){
console.log(data);
});
email
: requiredpassword
: requiredis_staff
: optionalis_active
: optionalsf.updateAccount({
email: 'johndoe@example.com',
name: 'John Doe',
is_staff: 0,
is_active: 1
}, function(err, body, httpcode){
console.log(body);
});
email
: requiredsf.deleteAccount('johndoe@example.com', function(err, body, httpcode){
console.log(body);
});
sf.addGroupMember({
user_name: 'johndoe@example.com',
group_id: 1
}, function(err, body){
console.log(body);
});
user_name
: requiredgroup_id
: requiredsf.deleteGroupMember({
user_name: 'johndoe@example.com',
group_id: 1
}, function(err, body){
console.log(body);
});
user_name
: requiredgroup_id
: requiredsf.moveMultiple({
src_repo: 'source_repo_id',
dst_repo: 'dest_repo_id',
file_names: [
'file.txt',
'image.jpg'
],
dst_path: '/',
p: '/'
}, function(err, body){
console.log(body);
});
src_repo
: requireddst_repo
: requiredfile_name
: requiredsf.renameDirectory({
repo_id: 'repo_id',
p: 'foo',
newname: 'pinkfloyd_newfolder'
}, function(err, body){
console.log(body);
});
repo_id
: requiredp
: requirednewname
: requiredsf.createDirectory({
repo_id: 'repo_id',
p: 'bar',
}, function(err, body){
console.log(body);
});
repo_id
: requiredp
: requiredsf.listDirEntries({
repo_id: 'repo_id',
p: '/',
t: 'd',
recursive: 1
}, function(err, body){
console.log(body);
});
repo_id
: requiredFAQs
npm module for Seafile Web API
We found that seafile-api demonstrated a not healthy version release cadence and project activity because the last version was released 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.