Open pnacht opened 1 year ago
@pnacht Any other projects using this approach?
Hey @harupy, hash-pinning is recommended by GitHub itself.
It is also required for all Apache projects. They let GitHub-owned repos stay version-pinned, but in my experience, if you hash-pin one Action, you might as well hash-pin everything, grouped updates mean the workload is basically identical.
Here's a small sample of some other projects that hash-pin their Actions:
@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.
Willingness to contribute
Yes. I can contribute this feature independently.
Proposal Summary
Hi, it's Pedro (see #9629). I'm back with another security suggestion!
I suggest that MLflow hash-pin all GitHub Actions used in workflows. This will ensure the workflows always have precisely the same behavior, protecting them against broken or malicious releases.
These dependencies can be kept up-to-date with dependabot. Dependabot can be set up to send a single monthly PR updating the hashes and version comments of all updated Actions at once (see this PR for example).
I'll send a PR pinning the workflow Actions and configuring renovatebot to keep them up-to-date along with this issue.
Motivation
MLflow currently major-version-pins its Actions (i.e.
actions/checkout@v4
). However, version tags are mutable, so a malicious attacker could overwrite a version tag to point to a malicious or vulnerable commit instead.Pinning workflow dependencies by hash ensures the dependency is immutable and its behavior is guaranteed.
Details
No response
What component(s) does this bug affect?
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/gateway
: AI Gateway service, Gateway client APIs, third-party Gateway integrationsarea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/recipes
: Recipes, Recipe APIs, Recipe configs, Recipe Templatesarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingWhat interface(s) does this bug affect?
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportWhat language(s) does this bug affect?
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesWhat integration(s) does this bug affect?
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrations