How to Install and Uninstall golang-github-cli-safeexec-dev Package on Kali Linux

Last updated: May 17,2024

1. Install "golang-github-cli-safeexec-dev" package

Please follow the instructions below to install golang-github-cli-safeexec-dev on Kali Linux

$ sudo apt update $ sudo apt install golang-github-cli-safeexec-dev

2. Uninstall "golang-github-cli-safeexec-dev" package

Learn how to uninstall golang-github-cli-safeexec-dev on Kali Linux:

$ sudo apt remove golang-github-cli-safeexec-dev $ sudo apt autoclean && sudo apt autoremove

3. Information about the golang-github-cli-safeexec-dev package on Kali Linux

Package: golang-github-cli-safeexec-dev
Source: golang-github-cli-safeexec
Version: 1.0.1-1
Installed-Size: 33
Maintainer: Debian Go Packaging Team
Architecture: all
Size: 5708
SHA256: 8ab24c4c4c80629ee607926bafab3b17a3e5ed77f1ccee8a45831382c230abd1
SHA1: 406ff12fa52f52850ace4f21dd67b163f67229a1
MD5sum: b1a89c22b8c61c7788aedfbb1adcfa5b
Description: safer version of exec.LookPath on Windows
safeexec is a Go module that provides a safer alternative to exec.LookPath()
on Windows.
.
The following, relatively common approach to running external commands
has a subtle vulnerability on Windows:
.
import "os/exec"
.
func gitStatus() error {
// On Windows, this will result in .\git.exe or .\git.bat being executed
// if either were found in the current working directory.
cmd := exec.Command("git", "status") return cmd.Run()
}
.
Searching the current directory (surprising behavior) before searching
folders listed in the PATH environment variable (expected behavior)
seems to be intended in Go and unlikely to be changed:
https://github.com/golang/go/issues/38736
.
Since Go does not provide a version of exec.LookPath() that only searches
PATH and does not search the current working directory, this module provides
a LookPath function that works consistently across platforms.
.
Example use:
.
import (
"os/exec" "github.com/cli/safeexec"
)
.
func gitStatus() error {
gitBin, err := safeexec.LookPath("git")
if err != nil {
return err
}
cmd := exec.Command(gitBin, "status")
return cmd.Run()
}
Description-md5:
Multi-Arch: foreign
Homepage: https://github.com/cli/safeexec
Section: golang
Priority: optional
Filename: pool/main/g/golang-github-cli-safeexec/golang-github-cli-safeexec-dev_1.0.1-1_all.deb