Delphi Code Review-368bde — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Delphi Code Review-368bde (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Format or concatenation in queriesTObjectList with OwnsObjects configured correctlytry/finally with Free for temporary objectsAssigned() before accessing references that may be nilDestroy with override freeing owned fieldsT in classes, I in interfaces, E in exceptionsF in private fields, A in parameters, L in local variablesProjeto.Camada.Dominio.Funcionalidade.pasbtn, edt, lbl, etc.)// ❌ Números mágicos
if ACustomer.Age > 18 then
// ✅ Constantes nomeadas
const MINIMUM_AGE = 18;
if ACustomer.Age > MINIMUM_AGE then
// ❌ with statement
with AQuery do begin
SQL.Text := '...';
Open;
end;
// ✅ Referência explícita
AQuery.SQL.Text := '...';
AQuery.Open;
// ❌ Catch genérico
except
on E: Exception do ShowMessage(E.Message);
// ✅ Exceptions específicas
except
on E: EFDDBEngineException do
raise EDatabaseException.Create('Falha: ' + E.Message);
// ❌ Logic em OnClick
procedure TfrmMain.btnSaveClick(Sender: TObject);
begin
// 50 linhas de logic de negócio aqui
end;
// ✅ Delegar para Service
procedure TfrmMain.btnSaveClick(Sender: TObject);
begin
FService.SaveCustomer(GetFormData);
end;
// ❌ Memory leak
function GetItems: TStringList;
begin
Result := TStringList.Create;
LoadItems(Result); // se LoadItems lançar exception, leak!
end;
// ✅ Seguro
function GetItems: TStringList;
begin
Result := TStringList.Create;
try
LoadItems(Result);
except
Result.Free;
raise;
end;
end;🔴 BLOQUEANTE: Memory leak — objeto não liberado em caso de exception
🔴 BLOQUEANTE: SQL injection — query usando concatenação de string
🟡 SUGESTÃO: Extrair método — este bloco tem 35 linhas
🟡 SUGESTÃO: Usar interface em vez de classe concreta (DIP)
🟢 NIT: Renomear variável 'S' para nome descritivo
🟢 NIT: Preferir guard clause a nesting
❓ PERGUNTA: O que acontece se ACustomer for nil aqui?
❓ PERGUNTA: Este objeto é liberado por quem?| Principle | Check |
|---|---|
| SRP | Does class have ONE responsibility? Service does not access data? |
| OCP | Do new features add classes, not modify existing ones? |
| LSP | Does either implementation of the interface work in place of the other? |
| ISP | Doesn't interface have methods that implementers don't use? |
| DIP | Constructor takes interfaces, not concrete classes? |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.