Hub rules-scala

rules-scala

v2 public Verified

Scala

Scala is a high-level language that combines object-oriented and functional programming. These rules govern type-safe development and functional programming patterns for AI-assisted Scala engineering.

@sigmashakeinc 3 pulls 6 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-scala →
Severity
5 error 1 warn 0 info
demo.cast
Scala is a high-level language that combines object-oriented and functional programming. These rules govern type-safe development and functional programming patterns for AI-assisted Scala engineering.

Rules index

6 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

scala

no-hardcoded-secrets-scala error log

Hardcoded credentials in Scala source are compiled into the JAR. Use sys.env('SECRET_KEY') or a configuration library (PureConfig, Typesafe Config) reading from environment variables.

Rule source requires an active Pro or Enterprise subscription.
no-java-deserialize-scala error block

Java ObjectInputStream deserialization is a well-known RCE vector. Use circe, play-json, upickle, or protobuf for safe serialization instead.

Rule source requires an active Pro or Enterprise subscription.
no-runtime-exec-scala error log

Runtime.exec() or scala.sys.process.Process with shell and interpolated strings enables command injection. Use the Seq form: Process(Seq('cmd', arg1, userArg)) — no shell involved.

Rule source requires an active Pro or Enterprise subscription.
no-scala-xml-external-entity error block

scala.xml.XML.load/loadString may process external entities (XXE). Create a custom SAXParser with DOCTYPE processing disabled: SAXParserFactory with setFeature(DISALLOW_DOCTYPE_DECL).

Rule source requires an active Pro or Enterprise subscription.
no-sql-interpolation-scala error block

String interpolation in SQL queries enables SQL injection. Use Slick's sql/sqlu interpolators with explicit parameters, or Doobie's fr interpolator which handles parameterization safely.

Rule source requires an active Pro or Enterprise subscription.
no-unchecked-asInstanceOf warning log

asInstanceOf[] throws ClassCastException if the runtime type doesn't match. Use pattern matching instead: value match { case x: TargetType => ... case _ => ... }

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v2
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
ffc0a7bc2b4ac52fbd92a79c2997dd5921943a74a7d4dd2ce7f8990ce1979563
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-scala/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-scala. The published version only bumps when a maintainer resyncs.

No commit history available.