Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
rest-tagging
Advanced tools
A REST interface for the Redis-Tagging module.
Use Redis-Tagging on other platforms (PHP, Ruby, Coldfusion, Python etc.) via this simple REST interface.
npm install
to install the dependencies.npm test
npm start
Redis Tagging uses the concept of buckets (you might call them namespaces). This way a single Redis Tagging instance can store ids and tags for multiple applications.
A bucket name must be alphanumeric including -
and _
and between 1 and 80 characters in length.
There is no limit on ids and tags. They could include any character.
Add or update an item. The URL contains the bucket (e.g. 'concerts') and the id for this item.
Parameters (as query parameters):
Example:
PUT /rt/id/concerts/571fc1ba4d?score=20130823&tags=["rock","stadium"]
Returns:
true
Delete an item and all its tag associations.
Example: DELETE /rt/id/concerts/12345
Returns:
true
The main method. Return the IDs for one or more tags. When more than one tag is supplied the query can be an intersection (default) or a union.
type=inter
(default) only those IDs will be returned where all tags match.
type=union
all IDs where any tag matches will be returned.
Parameters:
tags
(String) a JSON string of one or more tags.type
(String) optional Either inter (default) or union.limit
(Number) optional Default: 100.offset
(Number) optional Default: 0 The amount of items to skip. Useful for paging thru items.withscores
(Number) optional Default: 0 Set this to 1 to also return the scores for each item.order
(String) optional Either asc or desc (default).Example:
GET /rt/tags/concerts?tags=["Berlin","rock"]&limit=2&offset=4&type=inter
Returns:
{
"total_items":108,
"items":["8167","25652"],
"limit":2,
"offset":4
}
The returned data is item no. 5 and 6. The first 4 got skipped (offset=4). You can now do a
SELECT * FROM Concerts WHERE ID IN (8167,25652) ORDER BY Timestamp DESC
Get the top n tags of a bucket.
Example:
GET /rt/toptags/concerts/3
Returns:
{
"total_items": 18374,
"items":[
{"tag":"rock", "count":1720},
{"tag":"pop", "count":1585},
{"tag":"New York", "count":720}
]
}
Get all associated tags for an item. Usually this operation is not needed as you will want to store all tags for an item in you database.
Example:
GET /rt/id/concerts/12345
Returns:
[
"rock",
"stadium",
"miami"
]
Get all IDs saved in a bucket.
Example:
GET /rt/allids/concerts
Returns:
[
"id123",
"id456",
"id789"
]
List all buckets. Note: This uses redis.keys. Use with care! It will slow down Redis when lots of keys are stored in Redis.
Example:
GET /rt/buckets
Returns:
[
"concerts",
"vacations",
"users"
]
Remove a single bucket.
Example:
DELETE /rt/removebucket/concerts
Returns:
true
FAQs
A REST interface for redis-tagging
The npm package rest-tagging receives a total of 7 weekly downloads. As such, rest-tagging popularity was classified as not popular.
We found that rest-tagging 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.