diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 0f00a23fcc508c9fd4a0b00843ca1d51921e6494..723400a726230671689b3b482407bd05867e2a57 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -222,6 +222,10 @@ class FormulaAuditor
     if urls.any? { |p| p =~ %r[^git://github\.com/] }
       problem "Use https:// URLs for accessing GitHub repositories."
     end
+
+    if urls.any? { |u| u =~ /\.xz/ } && !f.deps.any? { |d| d.name == "xz" }
+      problem "Missing a build-time dependency on 'xz'"
+    end
   end
 
   def audit_specs