
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
hmpo-govuk-template
Advanced tools
Compile govuk mustache template into a more usable format and provide middleware for use in apps
Compiles govuk mustache template into a more usable format and provide middleware for use in apps.
Existing govuk mustache template has simple mustache placeholders for content sections, which necessitates a two step compile process where sections are compiled individually and then again into the parent template.
Compiling the template to replace these placeholders with variables allows for templates to implement the govuk template as a parent partial.
{{< govuk-template}}
{{$content}}
<h1>Page Content</h1>
{{/content}}
{{/ govuk-template}}
npm install [--save] hmpo-govuk-template
The compilation of the template is performed automatically as an npm postinstall hook.
When used as part of an express app, a setup method is provided which will add a static-middleware (using serve-static) to serve the template assets without needing to copy them to any other location.
It will also add the template as a mustache partial with a name of "govuk-template".
require('hmpo-govuk-template').setup(app[, { ... options ...}]);
{{< govuk-template}}
{{$pageTitle}}An example page{{/pageTitle}}
{{$content}}
<h1>Page Content</h1>
{{/content}}
{{/ govuk-template}}
A number of options can be passed with the app into the setup method:
path
- Sets the base path for the location of static assets - Default: /govuk-assets
Other options are passed onto the serve-static configuration, and more details can be found in the serve-static documentation
FAQs
Compile govuk mustache template into a more usable format and provide middleware for use in apps
The npm package hmpo-govuk-template receives a total of 3 weekly downloads. As such, hmpo-govuk-template popularity was classified as not popular.
We found that hmpo-govuk-template demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.