
Research
TeamPCP-Linked Supply Chain Attack Hits SAP CAP and Cloud MTA npm Packages
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Dynamically interpolate placeholder variables in any config file. Made especially to be a plugin for Viper.
go get z3ntl3.com/autoenv
You can just import it in your project and use it.
package main
import "z3ntl3.com/autoenv"
Let's consider the following as a .env file:
NAME="z3ntl3"
DOMAIN="com"
WEBSITE="{NAME}.{DOMAIN}"
And this code:
package main
import (
"fmt"
"log"
"github.com/spf13/viper"
"z3ntl3.com/autoenv/pkg/autoenv"
)
func main(){
viper.AddConfigPath("../tests")
// viper.AutomaticEnv()
viper.SetConfigName("test")
viper.SetConfigType("env")
if err := viper.ReadInConfig(); err != nil {
log.Fatal(err)
}
autoenv.New().Execute() // interpolates all the placeholder variables
fmt.Println(viper.GetString("WEBSITE")) // see the change
}
WEBSITE="{NAME}.{DOMAIN}" turns into z3ntl3.com.
Have this example ENV
NAME="z3ntl3"
DOMAIN="com"
WEBSITE="<NAME>.<DOMAIN>"
And this code:
package main
import (
"fmt"
"log"
"github.com/spf13/viper"
"z3ntl3.com/autoenv/pkg/autoenv"
)
func main() {
viper.AddConfigPath("../../tests")
// viper.AutomaticEnv()
viper.SetConfigName("test2")
viper.SetConfigType("env")
if err := viper.ReadInConfig(); err != nil {
log.Fatal(err)
}
autoenv.New().SetDelim("<", ">").Execute() // interpolates all the placeholder variables with the delims
fmt.Println(viper.GetString("WEBSITE")) // see the change
}
WEBSITE="<NAME>.<DOMAIN>" turns into z3ntl3.com.
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.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.