
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Painless static file handling for Rack apps.
Rack::Static
by default.</head>
and JS before </body>
by default.<!-- index.html //-->
<!doctype html>
<html lang="en">
<head>
</head>
<body>
</body>
</html>
and
# config.ru
require 'rack/scriptstacker'
class App
def call env
[
200,
{'Content-Type' => 'text/html'},
[File.read('index.html')]
]
end
end
use Rack::ScriptStacker do
css 'static/css'
javascript 'static/javascript'
end
run app
Results in...
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="/static/css/main.css" />
</head>
<body>
<script type="text/javascript" src="/static/javascript/main.js"></script>
<script type="text/javascript" src="/static/javascript/util.js"></script>
</body>
</html>
use Rack::ScriptStacker, configure_static: false do
css 'static/css'
javascript 'static/javascript'
end
use Rack::Static, url: ['static']
use Rack::ScriptStacker do
css 'static/css'
javascript 'vendor/javascript'
javascript 'static/javascript'
end
use Rack::ScriptStacker, configure_static: false do
css 'css' => 'stylesheets'
javascript 'js' => 'scripts'
end
use Rack::ScriptStacker,
stackers: {
javascript: { template: '<script src="%s"></script>' }
} do
javascript 'static/javascript'
end
<!-- index.html //-->
<!doctype html>
<html lang="en">
<head>
<!-- ScriptStacker: CSS //-->
</head>
<body>
<!-- ScriptStacker: JAVASCRIPT //-->
</body>
</html>
use Rack::ScriptStacker, inject_mode: :slot do
css 'static/css'
javascript 'static/javascript'
end
FAQs
Unknown package
We found that rack-scriptstacker 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.