Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

ac-redislock

Latest version: v6.0.19

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: admiralcloud
0 Stars
0 Forks
3 Versions
247 Downloads
JavaScript Repo language

Scan summary

ac-redislock was last scanned on 29 Nov 2026 at version 6.0.19. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 6.0.19.
  • Downloads: 247 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
6.0.19 LATEST 29 Nov 2026 No rules fired
6.0.18 16 Oct 2026 No rules fired
6.0.17 23 Aug 2026 No rules fired

No rules fired in 6.0.19

Findings

Findings for v6.0.19. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 6.0.19; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

AC RedisLock

This tool can be used to lock operations (e.g. make sure workers will fetch a job only once)

example workflow CodeQL

Breaking chnages version 5

Instead of just returning 423, a locked resource will now throw an error with a clear error message "resource_locked" and a code 423.

Breaking changes version 4

Version 4 no longer supports callbacks! Please use async/await instead.

Breaking changes version 2

RedisLock will now be only initialized once - if parameters redis, logger, logLevel, suppressMismatch are already set (by first init call) they are re-used and no longer overwritten.

If you want the old behaviour, init again with parameter reInit=true.

Requirements

Requires an existing Redis connection.

Usage

Init function requires a valid redis instance.

  • redis - INSTANCE required Redis instance
  • logger - OPTIONAL INSTANCE logger instance (e.g. Winston)
  • logLevel - OPTIONAL STRING logLevel for the Redis operation
  • suppressMismatch - OPTIONAL BOOL - if true, release mismatches are not logged
  • reInit - OPTIONAL BOOL - if true, you can re-init ac-redisLock, otherwise existing values (from first init) will be used (the latter is the default behaviour)

Those options will init ac-redislock once. Calling it again will not have any effect as long as you do not use reInit=true.

await redisLock.lockKey(params)

LockKey has the following parameters

  • redisKey - STRING required name for the key
  • expires - OPTIONAL INT seconds after the lock is released, defaults to 10 seconds
  • value - OPTIONAL STRING value for this redisKey. Use it to compare/secure lock values

Lock key throws an error 423 (if lock is already active) or otherwise returns the lock value, which can be used in releaseLock function.

await redisLock.releaseLock(params)

ReleaseKey has the following parameters

  • redisKey - STRING required name for the key
  • value - if set will be compared with the redisKey value before releasing. If not matching, the function will return an error message
  • suppressMismatch - if true, no warning will be logged if the value does not match the stored one (see "multiple processes" section)

getLock has following parameters

  • redisKey - STRING required name for the key
  • value - if set it will be used to match existing redisKey value before returning. If not matching, the function will return an error message

Examples

const redisLock = require('ac-redislock')

// create a Redis instance (using io-redis)
const app.redisInstance = new Redis(options)

await redisLock.init({
  redis: app.redisInstance 
})

const params = {
  redisKey: 'someMeaningfulKey',
}
try {
   // value for this lock -> set as params.value for releaseLock
  const value = await redisLock.lockKey(params)
}
catch(err) {
  // err can be 423 -> key is locked
}

// retrieve lock value later if needed before releasing lock
const value = await redisLock.getLock(params)
console.log('lock value:', value)

// redisKey is deleted and lock released
await redisLock.releaseKey(params)

Multiple Processes

If you use this package on multiple instances and want to make sure only of those instances processes a job we recommend to set suppressMismatch in order to avoid error messages if a process tries to release a key even though it did not lock it.

Links

License

MIT License Copyright © 2009-present, AdmiralCloud, AdmiralCloud AG, Mark Poepping

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm ac-redislock

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229