Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Making it easier for you to quickly interact with SQS in an idiomatic fashion.
require "better_sqs"
better = BetterSqs::Client.new
better.push "better_sqs_dev_queue", "You pushed the message successfully!"
# At this point you can confirm that the message was enqueued in the AWS console
message = better.reserve "better_sqs_dev_queue"
puts message.message_body
message.delete
If you prefer you can interact with a Queue directly for enqueue and dequeue operations
require "better_sqs"
better = BetterSqs::Client.new
queue = better.queue "better_sqs_dev_queue"
queue.push "You pushed the message successfully!"
message = queue.reserve
puts message.message_body
message.delete
BetterSqs makes it easy to check on the attributes of a SQS queue.
require "better_sqs"
better = BetterSqs::Client.new
queue = better.queue("better_sqs_dev_queue")
queue.approximate_number_of_messages
queue.approximate_number_of_messages_not_visible
queue.visibility_timeout
queue.created_timestamp
queue.last_modified_timestamp
queue.policy
queue.maximum_message_size
queue.message_retention_period
queue.queue_arn
queue.approximate_number_of_messages_delayed
queue.delay_seconds
queue.receive_message_wait_time_seconds
queue.redrive_policy
To configure BetterSqs use the configuration block pattern
require "better_sqs"
BetterSqs.configure do |config|
# When a message is deferred, this number of seconds is added to the time period that the message
# will remain invisible to other consumers. SQS has a hard cap of 12 hours on visibility.
# It defaults to 60 seconds
config.sqs_message_deferral_seconds = 120
# If you want to hardcode which region of SQS should be used then you can set this option. It is recommended
# to use the environment variable ENV["AWS_REGION"] instead
config.region = "us-west-2"
# for aws_access_key_id and aws_secret_access_key you can set them in this fashion, but it is strongly
# recommended that you just use the environment variables instead: ENV["AWS_ACCESS_KEY_ID"],
# ENV["AWS_SECRET_ACCESS_KEY"]
end
FAQs
Unknown package
We found that better_sqs 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.