Cyber Security Brasilby Igor Deungaro

The Model Hub as a Dependency: Pin by Hash, Mirror Internally

The Model Hub as a Dependency: Pin by Hash, Mirror Internally
Foto: USDAgov · CC BY 2.0

Your code pins library versions and nobody argues. The model that code loads comes from from_pretrained("org/model"), with no version at all.

A name is not a version

A repository on the hub is a git repository. The owner can push a new commit, rewrite main, swap the tokenizer or the config file. They can also lose the account, or delete everything. Whoever loads by name gets whatever is there at download time, and the local cache hides the change until the next clean machine.

A model loaded by name is a dependency without a lockfile.

Pin by commit, not by tag

The revision parameter accepts a commit hash. Tags and branches move; hashes do not. Alongside the hash, store the SHA-256 of every weight file and check it after download. That turns "the model changed on its own" from a mystery into a build error, which is where you want to find out.

The internal mirror is the missing piece

Pinning solves the silent change. It does not solve unavailability, or the fact that every CI pipeline goes out to the internet pulling gigabytes. An internal model registry plays the role a package proxy already plays for npm and PyPI: single entry point, reviewed once, immutable copy.

  • revision with a commit hash on every from_pretrained, checked in code review.
  • Per-file checksums recorded next to the hash.
  • The internal registry as the only allowed source in production; egress to the hub blocked at the network.
  • Promotion into the registry only after checking format, license and origin.
  • HF_HUB_OFFLINE=1 in runtime environments, so it fails loudly instead of downloading.

The quick test

Take your most important AI service and ask: if the source repository disappears today, does the next deploy come up? If the answer is "depends on the cache", you do not have a model in production. You have a link.

Este blog publica em português e inglês. / This blog publishes in Portuguese and English. EN · PT

Denunciar abuso

As inseguranças do sucesso da segurança cibernética

As inseguranças do sucesso da segurança cibernética. Tornar-se um grande profissional não precisa custar sua felicidade, mas a cultura da moagem torna isso provável. Nos últimos anos, a questão da saúde mental no setor de segurança cibernética ganhou destaque. Uma  pesquisa de 2019  revelou que 1 em cada 6 CISOs admitiu se  automedicar  para lidar com o estresse de seu trabalho. A tensão passa pelo escritório do CISO e permeia todo o setor. Um perfil que está crescendo  mais rápido que o orçamento  e uma sofisticação cada vez maior e  o impacto financeiro  dos ataques se combinam para transformar o que antes era um canto do departamento de TI em uma panela de pressão. John Hammond  , pesquisador de segurança cibernética da Huntress, falou sobre “ Hard Truths and Unexpected Realities: Lamentations in Producing Cybersecurity Content ” na  Intigriti 1337UP Live  , uma conferência online sobre bugs, em março de 2022. Seus...

DICA: comandos para pentest e segurança ofensiva

Fala galera, blz ? Segue uma lista de comandos maravilhosa, voltada para teste de vulnerabilidades. Observação Pertinente: Os TIPOS de COMANDOS e as INSTRUÇÕES estão em INGLÊS! NÂO ME RESPONSABILIZO POR USO INDEVIDO. Pré-requisitos: ✔️  Python 3.5 ✔️  OS que suporte Python (eu utilizei Kali) Reconnaissance / Enumeration Extracting Live IPs from Nmap Scan nmap 10.1.1.1 --open -oG scan-results; cat scan-results | grep "/open" | cut -d " " -f 2 > exposed-services-ips Simple Port Knocking for x in 7000 8000 9000; do nmap -Pn –host_timeout 201 –max-retries 0 -p $x 1.1.1.1; done DNS lookups, Zone Transfers & Brute-Force whois domain.com dig {a|txt|ns|mx} domain.com dig {a|txt|ns|mx} domain.com @ns1.domain.com host -t {a|txt|ns|mx} megacorpone.com host -a megacorpone.com host -l megacorpone.com ns1.megacorpone.com dnsrecon -d megacorpone.com -t axfr @ns2.megacorpone.com dnsenum domain.com nslookup -> set type=any -> ls -d domain.com for ...

Atacantes precisam de menos de 10 horas para encontrar fraquezas

Atacantes precisam de menos de 10 horas para encontrar fraquezas. Configurações vulneráveis, falhas de software e serviços da Web expostos permitem que hackers encontrem pontos fracos exploráveis ​​nos perímetros das empresas em apenas algumas horas, não em dias. O hacker ético médio pode encontrar uma vulnerabilidade que permite a violação do perímetro da rede e, em seguida, explorar o ambiente em menos de 10 horas, com testadores de penetração focados na segurança da nuvem obtendo acesso mais rapidamente aos ativos direcionados. Além disso, uma vez que uma vulnerabilidade ou fraqueza é encontrada, cerca de 58% dos hackers éticos podem invadir um ambiente em menos de cinco horas. Isso está de acordo com uma pesquisa com 300 especialistas do SANS Institute e patrocinada pela empresa de serviços de segurança cibernética Bishop Fox, que também descobriu que as fraquezas mais comuns exploradas pelos hackers incluem configurações vulneráveis, falhas de software e serviços da Web expost...

Quem sou eu

Minha foto
Igor Deungaro
Bem Vindo ao Cyber Security Brasil, espero que goste !!!
Ver meu perfil completo

Cyber Security

AI-BOM: What to List Beyond the Libraries

Foto: Creative Tools · CC BY 2.0 Your SBOM lists torch , transformers and three hundred transitive dependencies. It does not say which model is running, which data it was fine-tuned on, or which tools it can call. The classic SBOM sees half In an AI system, behaviour does not live only in code. It lives in the weights, the fine-tuning dataset, the system prompt and the set of tools exposed to the agent. Changing any one of them changes what the system does, and none of them shows up in an inventory generated from requirements.txt . When the warning arrives that a base model had a problem, "where do we use this?" turns into a manual hunt. If the system prompt changes behaviour in production, it is a component and belongs in the inventory. What goes into an AI-BOM Model: name, origin, commit hash, file checksums, format and license. Training and fine-tuning datasets: origin, version, hash and who approved them. System prompts and templates, versioned as code, with ...

Marcadores