maennchen

maennchen

Hey everyone!

If your Elixir project lives on GitHub (public or private), there’s a new GitHub Action that might be worth adding to your CI setup:
:backhand_index_pointing_right: erlef/mix-dependency-submission

This Action extracts your dependencies from your mix.exs / mix.lock and submits them to GitHub’s Dependency Submission API. That unlocks several useful GitHub features:

  • :locked_with_key: Dependabot alerts and security updates — including transitive deps
  • :chart_increasing: Full dependency graph visibility — even without lockfiles
  • :eyes: Dependency Review — see what changed in PRs
  • :receipt: Helps with auditing and compliance for third-party packages

Quick Example

Add this to your GitHub Actions workflow:

on:
  push:
    branches:
      - "main"

jobs:
  report_mix_deps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: erlef/mix-dependency-submission@v1

OS Support

It works out-of-the-box on GitHub-hosted runners for:

  • Linux (x64, ARM64)
  • macOS (x64, ARM64)
  • Windows (x64)

Check the README for full compatibility details.


The Action was built as part of the Erlang Ecosystem Foundation’s ongoing efforts to support the BEAM community’s tooling and security story. Feedback and adoption are super appreciated — especially if you’re managing multiple projects or teams.

Let me know if you try it out or run into any issues!

Showing Posts 31 to 22

maennchen

maennchen OP

Unfortunately, no

SBoMs are doing this. We’re working on making this happen.

Benjamin-Philip

Benjamin-Philip

Is there a standard for tracking cross language dependencies? Like in the case of an NIF with Rust or C dependencies (leaving aside the lack of any uniformity with and C/C++ for now?

Benjamin-Philip

Benjamin-Philip

Wouldn’t the topmost lockfile of the root repo have the entire dependency tree? Then it is just a question of if the lockfile is included in the git repo or not.

Benjamin-Philip

Benjamin-Philip

This makes me feel like dependencies as code is both a blessing and a curse. It enables us to add/remove deps programmatically in ways that would be very difficult in other languages to do and at the same time makes a lot of basic and standard functionality so much harder to setup.

maennchen

maennchen OP

Yes, mix.exs files are arbitrary Elixir Code. mix.lock always has the same format, but still is elixir code.

Depending on the SCM (Git / Path, Hex, …), there will be an entry in the lockfile (optional) and it contains different content per SCM. For example, Hex saves the transitive dependencies, Git does not.

To get all the info out, I had to have mix running. (Mix.in_project)

dimitarvp

dimitarvp

Oh, yeah, and in fact dependencies can, ahem, depend on the Mix.env, true.

Sigh. That really makes this whole ordeal more complex than it should have been.

EDIT: Though thinking of it, it still is not that bad. One can just grab their final mix.lock and only work with that. That technically makes the whole thing automatable with any other programming language, no? Especially those that produce statically linked binaries like Golang and Rust.

LostKobrakai

LostKobrakai

mix.exs can contain arbitrary elixir code. So you need an elixir compiler and runtime.

dimitarvp

dimitarvp

You are saying that it’s not enough to implement a parser for mix.exs and mix.lock in another language because there is stuff from them that has to be ran / evaluated in the BEAM VM itself? And only through that to get all necessary info to do GitHub dependency submission?

maennchen

maennchen OP

Unfortunately the Mix Dependencies are not that simple. The files do not contain all the info and are written in Elixir.

I had to implement multiple strategies, one being an actual Mix Runtime that loads the project config:

https://github.com/erlef/mix-dependency-submission/tree/main/lib/mix_dependency_submission/fetcher

Benjamin-Philip

Benjamin-Philip

I wonder if they will have any concerns of introducing a new stack (Elixir + BEAM) into their build pipeline. I suspect they’d prefer a go binary or a ruby script both for CI and maintenance reasons. I guess we’ll know in time.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews