You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo or vuls groupid vuls and vuls sub bits / depends ... gooval etc ... might need other perms ie windows admin etc...
ie systemwide installs its been a while on vuls
//permissions.go
package main
import (
"fmt"
"os/exec"
"os/user"
"syscall"
)
func permissions) {
currentUser, err := user.Current()
if err != nil {
fmt.Println("Error getting current user:", err)
return
}
inVulsGroup, err := IsUserInGroup(currentUser, "vuls")
if err != nil {
fmt.Println("Error checking if user is in vuls group:", err)
return
}
if inVulsGroup || IsSudoUser(currentUser) {
cmd := exec.Command("vuls", "scan")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
err := cmd.Run()
if err != nil {
fmt.Println("Error running Vuls scanner:", err)
return
}
} else {
fmt.Println("User", currentUser.Username, "is not permitted to run Vuls scanner")
}
}
func IsUserInGroup(user *user.User, group string) (bool, error) {
// Logic to check if user is in a specific group
}
func IsSudoUser(user *user.User) bool {
// Logic to check if user has sudo privileges
}
`
The text was updated successfully, but these errors were encountered:
https://github.com/necrose99/GLSA-OVAL/blob/main/glsa_parser.py
Trying to clean up the go into a clear single file..
Abuse of gpt or cluade.
Python3 seems to nail those , gentoo ebuilds in about 3-5 promts..
Go tends to take an unholy amount then it tends to forget lines of code..
Just having to share a laptop.. since last thunderstorm took out my surge strips, desktop n laptop.. building took a direct hit.. so Wsl2 gentoo is bit limiting..
@mgorny or other gentoo devs could add oval definition files ie glsa.gentoo.org/oval as an option,
Openscap, mageni , vuls , etc vulnerability scanners would have more impact, that use oval files..
https://github.com/necrose99/GLSA-OVAL my parser needs much work ... yet still probably bit off more than i can chew... for now
(hints welcomed)
however if Theirs items to take and intégrate feel free ...
scrape webpages for nvd cve links chat gpt is a help but... still broken bits
Gentoo Security Advisories anyway they have nvd links etc ..
sudo or vuls groupid vuls and vuls sub bits / depends ... gooval etc ... might need other perms ie windows admin etc...
ie systemwide installs its been a while on vuls
The text was updated successfully, but these errors were encountered: