Add SSRF detection capabilities

Aperta
#141 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ruby
Ambito
security

Direzione di ricerca

The request is for a new predicate on the IPAddr class, so start at that class definition and look at which address predicates already exist to see what a consistent API looks like. The scope needs a decision first: which ranges count as unsafe (loopback, link-local, RFC1918, IPv6 equivalents), and whether the answer is a new method or an extension of existing ones. Done looks like IPAddr#ssrf_unsafe? returning true for 10.0.0.1 and false for a public address, backed by tests covering each range. Expect a maintainer discussion before any code lands, so read the thread before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I've used ssrf_filter in the past to prevent HTTP requests to internal endpoints. Over time, I've found I need a lot of the functionality found in the library in other workflows not related to net-http.

I'd like to know your thoughts on adding a potential API to determine whether an IP is considered unsafe. Something like:

ip = IPAddr.new("10.0.0.1")
ip.ssrf_unsafe? #=> true
Lingua principale
Ruby
Stelle
83
Fork
50
Merge medio
1g 2h
PR unite (30g)
8

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ruby/ipaddr

Tutte le issue di ruby/ipaddr

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.