sklearn-pipelines — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sklearn-pipelines (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.
A Pipeline chains preprocessing and the estimator into one object so that every fit happens on training folds only. This makes leakage structurally impossible and makes the model trivially serializable for serving. If you remember one thing from this pack: wrap preprocessing in a Pipeline.
from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from sklearn.ensemble import HistGradientBoostingClassifier
num = ["age", "income", "tenure"]
cat = ["country", "plan"]
preprocess = ColumnTransformer([
("num", Pipeline([
("impute", SimpleImputer(strategy="median")),
("scale", StandardScaler()),
]), num),
("cat", Pipeline([
("impute", SimpleImputer(strategy="most_frequent")),
("ohe", OneHotEncoder(handle_unknown="ignore")),
]), cat),
])
model = Pipeline([
("prep", preprocess),
("clf", HistGradientBoostingClassifier(random_state=42)),
])
model.fit(X_train, y_train) # all preprocessing fit on train only
preds = model.predict(X_test) # preprocessing reused, no leakagefrom sklearn.model_selection import cross_val_score, StratifiedKFold
cv = StratifiedKFold(n_splits=5, shuffle=True, random_state=42)
scores = cross_val_score(model, X, y, cv=cv, scoring="roc_auc")
# preprocessing is re-fit inside each fold automaticallyPair this with the hyperparameter-tuning skill — pass the whole pipeline to the search and tune with clf__ / prep__ prefixes.
from sklearn.base import BaseEstimator, TransformerMixin
class LogTransform(BaseEstimator, TransformerMixin):
def __init__(self, cols): self.cols = cols
def fit(self, X, y=None): return self
def transform(self, X):
X = X.copy()
X[self.cols] = np.log1p(X[self.cols])
return XX, never y; impute/clean targets separately and deliberately.A single fitted Pipeline artifact that the model-evaluation, hyperparameter-tuning, and model-serving skills all consume directly (joblib.dump(model, "model.joblib")).
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.