
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
A Go library for JavaScript obfuscation using V8 JavaScript Engine.
jsobfuscator-go is a Go library that helps obfuscate JavaScript code by using JavaScript Obfuscator and V8 Engine. This library provides a simple way to protect your JavaScript code from being easily read and understood.
go get github.com/naicoi92/obfuscator
go get)package main
import (
"fmt"
"github.com/naicoi92/obfuscator"
)
func main() {
// Initialize the obfuscator
obf, err := obfuscator.NewObfuscator()
if err != nil {
panic(err)
}
// JavaScript code to obfuscate
jsCode := `function sayHello() { return "Hello World"; }`
// Perform obfuscation
obfuscatedCode, err := obf.Obfuscate(jsCode)
if err != nil {
panic(err)
}
// Print the obfuscated code
fmt.Println(obfuscatedCode)
}
const options = {
compact: (Math.random() < 0.5),
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
numbersToExpressions: true,
simplify: true,
stringArrayShuffle: true,
splitStrings: true,
stringArrayThreshold: 1
}
The library uses a caching mechanism to optimize performance when performing multiple obfuscations. You should reuse the same Obfuscator instance when you need to obfuscate multiple JavaScript code snippets.
obf, _ := obfuscator.NewObfuscator()
// Use the same instance for multiple obfuscations
result1, _ := obf.Obfuscate(jsCode1)
result2, _ := obf.Obfuscate(jsCode2)
result3, _ := obf.Obfuscate(jsCode3)
Contributions are welcome! Please feel free to submit a Pull Request or create an Issue on GitHub.
This project is distributed under the MIT license.
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
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.