Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
github.com/finalcad/traefikregionalplugin
This plugin is to redirect request to the appropriate dns based on custom uuid reading.
Traefik plugins are developed using the Go language.
A Traefik middleware plugin is just a Go package that provides an http.Handler
to perform specific processing of requests and responses.
Rather than being pre-compiled and linked, however, plugins are executed on the fly by Yaegi, an embedded Go interpreter.
This plugin redirect on different host when the url match a regex and this regex contains a Extended UUID.
For a plugin to be active for a given Traefik instance, it must be declared in the static configuration.
Plugins are parsed and loaded exclusively during startup, which allows Traefik to check the integrity of the code and catch errors early on. If an error occurs during loading, the plugin is disabled.
For security reasons, it is not possible to start a new plugin or modify an existing one while Traefik is running.
Once loaded, middleware plugins behave exactly like statically compiled middlewares. Their instantiation and behavior are driven by the dynamic configuration.
Plugin dependencies must be vendored for each plugin. Vendored packages should be included in the plugin's GitHub repository. (Go modules are not supported.)
# Dynamic configuration
http:
routers:
my-router:
rule: host(`whoami.localhost`)
service: service-foo
entryPoints:
- web
middlewares:
- TraefikRegionalPlugin
services:
service-foo:
loadBalancer:
servers:
- url: http://127.0.0.1:5000
middlewares:
TraefikRegionalPlugin:
plugin:
dev:
GlobalHostUrls: # list of url for starting detection
- "whoami.localhost"
MatchPaths: # Regex to path the path and the index of the group of UUID
- regex: ^\/project\/(([0-9A-Fa-f]{8}[-]){2,}([0-9A-Fa-f]{4}[-]){3}[0-9A-Fa-f]{12})$
index: 0
DestinationHosts: # Destination for redirection based on value extract from UUID
- host: "whoami.ja.localhost"
value: 1
- host: "whoami.na.localhost"
value: 2
IsLittleEndian: true # Endianness of the server
To run the unit test:
make test
To be tested in local, use the docker-compose file in the folder local-testing
. This docker-compose work on linux and need to add this three lines in your /etc/hosts
127.0.0.1 whoami.localhost
127.0.0.1 whoami.ja.localhost
127.0.0.1 whoami.na.localhost
After that you can run docker-compose up
and make request on curl whoami.localhost/...
FAQs
Unknown package
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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.