
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
github.com/rgzr/sshtun
sshtun is a Go package that provides a SSH tunnel with port forwarding supporting:
ssh-agent
based authenticationBy default it reads the default linux ssh private key locations and fallbacks to using ssh-agent
, but a specific authentication method can be set.
The default locations are ~/.ssh/id_rsa
, ~/.ssh/id_dsa
, ~/.ssh/id_ecdsa
, ~/.ssh/id_ecdsa_sk
, ~/.ssh/id_ed25519
and ~/.ssh/id_ed25519_sk
.
go get github.com/rgzr/sshtun
package main
import (
"context"
"log"
"time"
"github.com/rgzr/sshtun"
)
func main() {
// We want to connect to port 8080 on our machine to acces port 80 on my.super.host.com
sshTun := sshtun.New(8080, "my.super.host.com", 80)
// We print each tunneled state to see the connections status
sshTun.SetTunneledConnState(func(tun *sshtun.SSHTun, state *sshtun.TunneledConnState) {
log.Printf("%+v", state)
})
// We set a callback to know when the tunnel is ready
sshTun.SetConnState(func(tun *sshtun.SSHTun, state sshtun.ConnState) {
switch state {
case sshtun.StateStarting:
log.Printf("STATE is Starting")
case sshtun.StateStarted:
log.Printf("STATE is Started")
case sshtun.StateStopped:
log.Printf("STATE is Stopped")
}
})
// We start the tunnel (and restart it every time it is stopped)
go func() {
for {
if err := sshTun.Start(context.Background()); err != nil {
log.Printf("SSH tunnel error: %v", err)
time.Sleep(time.Second) // don't flood if there's a start error :)
}
}
}()
// We stop the tunnel every 20 seconds (just to see what happens)
for {
time.Sleep(time.Second * time.Duration(20))
log.Println("Lets stop the SSH tunnel...")
sshTun.Stop()
}
}
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
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.