Hub rules-scikit-learn

rules-scikit-learn

v3 public Verified

scikit-learn

scikit-learn is a Python library for machine learning providing simple and efficient tools for data analysis. These rules govern model selection, feature engineering, and pipeline construction for AI-assisted machine learning.

@sigmashakeinc 2 pulls 4 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-scikit-learn →
Severity
1 error 3 warn 0 info
demo.cast
scikit-learn is a Python library for machine learning providing simple and efficient tools for data analysis. These rules govern model selection, feature engineering, and pipeline construction for AI-assisted machine learning.

Rules index

4 governance rules

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

scikit-learn

scikit-learn-force-updated-api warning log

sklearn.externals.joblib was removed in scikit-learn 0.23. Import directly: import joblib. Update your imports to avoid ImportError on current versions.

Rule source requires an active Pro or Enterprise subscription.
scikit-learn-no-fit-on-test-data warning log

fit() called on test data causes data leakage — the model or preprocessor will learn statistics from the test set, making evaluation metrics optimistically biased. FIX: call fit() on training data only and use transform() on test data: scaler.fit(X_train); scaler.transform(X_test).

Rule source requires an active Pro or Enterprise subscription.
scikit-learn-no-joblib-load-untrusted warning log

joblib.load() deserializes model files using pickle protocol. RISK: joblib model files from untrusted sources (downloaded URLs, user uploads) can execute arbitrary code on load (CWE-502). FIX: only load joblib files from sources you control; for model exchange with external parties, use ONNX or skops.io.

Rule source requires an active Pro or Enterprise subscription.
scikit-learn-no-pickle-load error ask

pickle.load() on scikit-learn model files is a code-execution risk. RISK: a maliciously crafted .pkl file can execute arbitrary Python on load (CWE-502). This affects any model downloaded from an external source. FIX: use joblib.load() for models you control, or skops.io (sklearn-onnx) for safe cross-platform model exchange; never load .pkl files from untrusted sources.

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
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
8b60e1194a904c649ecf9741d751424bf2125a7a206e95948ce0f5dfac66f0ed
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

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

No commit history available.