
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
The CheapCoder gem can censor Ruby scripts.
This allows only non-structed scripts which do not contain any shell command.
The sample code below provides a script samples/sample1.rb rejected any built-in methods, e.g. puts
and ==
(received by a constant).
require 'cheap_coder'
require 'parser/current'
CODEPATH = 'samples/sample1.rb'
expr = Parser::CurrentRuby.parse(File.read(CODEPATH))
censor = CheapCoder::Censor.new
expr = censor.process(expr)
puts Unparser.unparse(expr)
The censor rejects also any shell commands. For example, please see the censord result of samples/sample2.rb.
One can set a whitelist of methods.
The sample below provides a script admits the build-in puts
.
method_whitelist = %i[puts]
censor = CheapCoder::Censor.new(
allowed_methods: method_whitelist,
)
expr = censor.process(expr)
One can set an evaluator to a censor instance. For example, the below evaluates the ABC size metric (not strictly).
censor = CheapCoder::Censor.new(
evaluator: CheapCoder::AbcEvaluator.new
)
censor.process(expr)
censor.score # gives ABC size
FAQs
Unknown package
We found that cheap_coder demonstrated a healthy version release cadence and project activity because the last version was released less than 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.