
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Helper (simple wrapper) for 500px API.
Focused on authenticated user photo manipulations, including upload
npm install api_500px
var Api500px = require('api_500px');
var api = new Api500px(
{
key: 'your_500px_key_token',
secret: 'your_500px_secret_token',
callback: 'http://example.com/oauth_callback'
});
api.authRequest(function(err, authToken, authSecret, results)
{
if (err) return callback(err);
// redirect client to OAuth page
callback(null, 'https://api.500px.com/v1/oauth/authorize?oauth_token='+authToken);
});
api.getAccessToken('api_500px_auth_verifier_token', function(err, accessToken, accessSecret, results)
{
if (err) return callback(err);
// access token's been stored within the api instance as well
callback(null, {status: 'ready'});
});
api.getUser(function(err, userData)
{
if (err) return callback(err);
// user's info has been stored within the api instance
// - normalized: api.data.user.id and api.data.user.username
// - original: api.data.user._details
// "returned" userData has same format
callback(null, userData);
});
api.getPhotos(1, function(err, photos)
{
if (err) return callback(err);
// "returned" photos is unparsed JSON string
callback(null, photos);
});
var params =
{
feature: 'popular',
user_id: 26,
rpp: 50,
page: 4,
image_size: 2
};
api.getPhotos(params, function(err, photos)
{
if (err) return callback(err);
// "returned" photos is unparsed JSON string
callback(null, photos);
});
var photoId = 12539831;
api.getPhotoInfo(photoId, function(err, info)
{
if (err) return callback(err);
// "returned" info is normalized photo object
callback(null, info);
});
var photoId = 12539831
, params =
{
image_size: 2,
tags: 0,
comments: 1,
comments_page: 4
};
api.getPhotoInfo(photoId, params, function(err, info)
{
if (err) return callback(err);
// "returned" info is normalized photo object
callback(null, info);
});
Normalized photo object:
{
id : 12539831,
title : 'Toronto panorama',
description: 'Taken in Toronto, Ontario @ March 16, 2008',
private : false,
url : 'http://pcdn.500px.net/12539831/805beb838eafaf9253ff176b366af6f9fb31d593/4.jpg',
tags : [ 'toronto', 'night', 'skyline' ],
safety : true,
license : null,
dates : '2008-03-15T00:00:00-04:00',
latitude : 43.685650966634206,
longitude : -79.41691160202026
}
TODO: Refactor it.
var photoUrl = 'http://farm9.staticflickr.com/8438/7789275832_3ab0e23be3_o.png';
api.uploadPhoto(photoUrl, flickrNormalizedPhotoInfoData, function(err, result)
{
if (err) return callback(err);
// result consists of two properties
// - result.message: upload status message
// - result.photo: parsed, non-normalized created photo object
callback(null, result.photo);
});
TBD
(The MIT License)
Copyright (c) 2012 Alex Indigo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
500px API helper, including OAuth and upload
We found that api_500px 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.