CHANGELOG
View Sourcev0.20.0 (2026-10-12)
- Limit decompressed registry resources to the new
registry_max_uncompressed_sizeconfig option, 16 MiB by default, and reject compressed Erlang terms in API responses (GHSA-7c4r-cgf9-9jmq, CVE-2026-105274). - Return
{error, {cacerts_unavailable, Reason}}fromhex_http_httpcfor HTTPS requests on OTP 24 and when the OS CA certificates can't be loaded, instead of sending them without verifying the server certificate. Also verify the server certificate for URLs with an uppercaseHTTPSscheme (GHSA-p26c-h8c2-rwqj, CVE-2026-103502). - Add Workload Identity.
hex_cli_auth:workload_identity_auth/2exchanges the OIDC token of a GitHub Actions job for API auth scoped to one package, and repository requests to Hex.pm organizations exchange it for a repository token when the build tool provides the newget_workload_identity_tokenandpersist_workload_identity_tokencallbacks. - Add the
hex_oidcmodule andhex_api_oauth:jwt_bearer_token/3andhex_api_oauth:oidc_audience/1. - Report the organizations whose SSO or 2FA requirements the session has to complete through the optional
organization_reauthcallback. Addhex_cli_auth:refresh_tokens/1,hex_api_oauth:organization_authorization/2andhex_api_oauth:organization_reauth_required/1. - Return
{auth_error, token_refresh_unavailable}when a token refresh gets no usable response, and keep{auth_error, token_refresh_failed}for when the server refuses the refresh token. - Only use the global OAuth token for Hex.pm repositories.
- Add the
ADVISORY,RETIREMENTandCOOLDOWNpolicy override actions and theadvisory_id,retirement_reasonandcommentoverride fields. - Create identical package tarballs from identical files and metadata, independent of file order, umask, operating system and Unicode normalization of file names. Files can be given as
{Name, ContentsOrPath, #{executable => boolean()}}to set their mode. - Compress package and docs tarballs with the new
hex_deflatemodule, so their bytes and checksums don't depend on the zlib library the VM links. - Fix PAX record lengths for file names with non-ASCII characters, and file paths that need a 156 byte ustar prefix.
- Stop serializing concurrent requests on global locks when the credentials need no exchange or refresh, and concurrent unpacks on the file server.
- Create the unpack temporary directory inside the output directory instead of the current working directory, and build package tarballs in memory.
- Write UTF-8 file names when unpacking with the latin1 native file name encoding.
- Decode metadata strings and quoted atoms that end in a backslash.
- Drop the zero padding from tar member names that end in incomplete UTF-8.
- Unpack docs tarball binaries and package contents made of several gzip members.
- Unpack hand-built metadata with nameless legacy requirements or a
filesfield that isn't a list of binaries instead of crashing. - Don't follow symlinks when updating the modification time of unpacked files.
- Update the vendored
erl_tarto OTP 29.1.1.
v0.19.0 (2026-07-21)
- Add
hex_cli_authmodule with callback-based authentication handling for build tools:with_api/3,4andwith_repo/2,3request wrappers, credential resolution, OAuth token exchange and automatic refresh, OTP prompt handling, and device authentication. - Add
hex_api_oauth:device_auth_flow/4,5handling the complete OAuth device authorization flow. - Add
trusted,oauth_exchange,oauth_exchange_url, andcli_auth_callbacksconfig options. - Restructure the
Policyregistry resource into per-repository restrictions and per-package overrides, replacing the ordered rule list. - Build the policy URL like other registry resources, so
hex_repo:get_policy/2no longer requiresrepo_organization.
v0.18.0 (2026-06-02)
- Add support for the
Policyregistry resource: signed organization dependency policies that opted-in clients honor at resolution time. - Add
hex_repo:get_policy/2to fetch and verify a policy resource from a repository. - Add
hex_registry:build_policy/2,hex_registry:unpack_policy/4,hex_registry:encode_policy/1, andhex_registry:decode_policy/3.
v0.17.0 (2026-05-20)
- Add
aliasesfield toSecurityAdvisoryproto for cross-referencing advisories (e.g. GHSA/CVE pairs). - Add
hex_advisory:group_for_display/1to deduplicate advisories that share aliases.
v0.16.1 (2026-05-19)
- Add
published_attimestamp field to release registry resource.
v0.16.0 (2026-05-13)
- Validate tarball file paths and symlink targets when creating package and docs tarballs.
- Add
tarball_files_rootconfig for tarball source paths, defaulting to the current directory and allowing absolute paths only inside that root. - Add streaming
metadata.configdecoding and increase max metadata size to 1024KB. - Add
metadata_fieldsconfig to decode only selected package metadata fields. - Add security advisory fields to package and versions registry resources.
- Add
hex_repo:fingerprint/1andhex_repo:fingerprint_equal/2for repository public key verification. - Return response headers from
hex_http_httpc:request_to_file/6. - Accept SPDX
LicenseRef-*license identifiers.
v0.15.0 (2026-03-09)
- Add
request_to_filecallback tohex_httpbehaviour for streaming HTTP response body directly to a file. - Add
hex_repo:get_tarball_to_file/4andhex_repo:get_docs_to_file/4for downloading tarballs and docs directly to disk. - Implement
request_to_fileinhex_http_httpcusing httpc's{stream, Filename}option.
v0.14.1 (2026-03-09)
- Add
max_sizeextraction limit to package inner tarball and docs tarball unpacking for zip bomb protection.
v0.14.0 (2026-03-09)
- Stream tar extraction to disk, writing file entries in chunks instead of loading into memory.
- Add
{file, Path}support tohex_tarball:unpack_docs/2,3to read doc tarballs from disk. - Add
noneoutput mode tohex_tarball:unpack/2,3to extract only metadata and checksums, skipping contents.
v0.13.0 (2026-03-08)
- Add file-based unpack via
hex_tarball:unpack({file, Path}, Output)to avoid loading entire tarball into memory. - Add size validations for outer tarball entries (VERSION, CHECKSUM, metadata.config) during creation and extraction.
v0.12.2 (2026-02-27)
- Exclude
src/safe_erl_term.erlfrom package.
v0.12.1 (2026-02-27)
- Fix unsafe deserialization of Erlang terms in API responses (CVE-2026-21619).
v0.12.0 (2025-10-26)
- Add short URL API
hex_api_short_url:create/2. - Add OAuth API:
hex_api_oauth:device_authorization/3,4hex_api_oauth:poll_device_token/3hex_api_oauth:refresh_token/3hex_api_oauth:revoke_token/3hex_api_oauth:client_credentials_token/4,5
Support 2FA authentication, any API request can now return
{error, otp_required | invalid_totp}if 2FA is required. The config optionapi_otpcan be used to provide the TOTP code.- Differentiate between registry verification errors.
{error, unverified}has been replaced with{error, bad_repo_name | bad_signature}. - Support nested maps in
extrapackage metadata field.
v0.11.0 (2024-12-03)
- Use secure SSL defaults for OTP 25+.
- Start inets and ssl applications.
v0.10.3 (2024-06-28)
- Fix
hex_api_release:retirement_params/0type spec.
v0.10.2 (2024-06-12)
- Fix
hex_tarball:create_docs/1type spec.
v0.10.1 (2024-06-11)
- Drop support for OTP 20.
- Update
hex_licensesmodule to reflect most recent list available from SPDX.
v0.10.0 (2023-05-09)
Drop support for old OTP and Rebar versions.
hex_corenow requires OTP20+ and Rebar 3.15.1+.
v0.9.0 (2022-11-03)
Change
hex_registryfunctions to match protobuf fieldsBefore:
> hex_registry:unpack_names(Payload, <<"test">>, TestPublicKey) {ok,[#{name => <<"package1">>, ...}, #{name => <<"package2">>, ...}]}After:
> hex_registry:unpack_names(Payload, <<"test">>, TestPublicKey) {ok,#{packages => [#{name => <<"package1">>, ...}, #{name => <<"package2">>, ...}], repository: <<"test">>}}Change
hex_repofunctions to match protobuf fieldsBefore:
> hex_repo:get_names(Config), {ok,{200, ..., [#{name => <<"pacakge2">>, ...}, #{name => <<"pacakge2">>, ...}, ...]}}After:
> hex_repo:get_names(Config), {ok,{200, ..., #{packages => [#{name => <<"pacakge2">>, ...}, #{name => <<"pacakge2">>, ...}, ...], repository => <<"test">>}}}
v0.8.4 (2021-12-20)
- Add
@doctohex_licenses
v0.8.3 (2021-12-14)
- Don't warn on non-https URLs
- Add
hex_licensesmodule
v0.8.2 (2021-05-28)
- Warn on unsafe httpc default SSL settings
v0.8.1 (2021-05-20)
- Update gpb to 4.17.6 to avoid dialyzer warnings
v0.8.0 (2021-05-02)
- Deprecate registry encode/decode API in favour of new high-level build/unpack API
- Add
updated_atto repository names resource
v0.7.1 (2020-10-12)
- Fix dialyzer warnings on OTP 23
v0.7.0 (2020-10-20)
- Fix compatibility with OTP 24
Change
hex_tarball:create/2error value from{error, too_big}to{tarball, {too_big_compressed | too_big_uncompressed, Size}}.
v0.6.10 (2020-08-25)
- Add configuration for max tarball size
- Do not create extraneous "memory" directory when unpacking
v0.6.9 (2020-05-24)
v0.6.8 (2020-02-04)
- Fix tarball file extraction through symlinks
v0.6.7 (2020-02-03)
- Fix compatibility with OTP 18 and 17
v0.6.6 (2020-02-03)
- Do not crash on empty tarballs
- Fix directory traversal vulnerability for symlinks in tarballs
v0.6.5 (2020-01-14)
- Transition away from
http_uriwhen using newer OTP releases - Ensure
Roleis given as an atom inhex_api_organization_member:add/3 - Add
http_headersto thehex_core:config()type - Add default
http_headerstohex_core:default_config/0 - Fix
hex_registry:decode_and_verify_signed/2spec - Fix
hex_tarball:files/0type
v0.6.4 (2019-12-27)
- Fix setting level and transfer options in organization api
v0.6.3 (2019-12-16)
- Add organization API
- Add level and transfer params to add owner API
- Add
hex_tarball:unpack_docs/2 - Add
hex_api_auth:test_key/3
v0.6.2 (2019-11-11)
- Gracefully handle HTTP errors
v0.6.1 (2019-07-30)
- Fix bug when publishing with configuration that does not have
repo_organizationkey set
v0.6.0 (2019-07-27)
- Backwards-incompatible: Change successful return value of
hex_tarball:create/2from{ok, {Tarball, Checksum}}to{ok, Map}. Currently,Maphastarball,inner_tarball, andouter_tarballkeys - Rename existing tarball checksum to inner checksum and deprecate it
- Add tarball outer checksum
- Do not allow comments in
safe_erl_term - Forward compatible tarball contents by not failing on unknown files
v0.5.1 (2019-07-30)
- Fix bug when publishing with configuration that does not have
repo_organizationkey set
v0.5.0 (2019-02-26)
- Fetch package data from proper repository organization and don't verify origin if configured
- Backwards-incompatible: Make
hex_apimodule private - Backwards-incompatible:
organizationconfig key has been replaced withapi_organizationandapi_repositorykeys - Add
repo_organizationconfig key vendor.sh: Add missinghex_pb_*.erlfilesvendor.sh: Fix replacinghex_core
v0.4.0 (2018-12-30)
- Revert switch from proto2 to proto3
- Verify authenticity of signed payload
- Add
repo_verify_originconfig option
v0.3.0 (2018-12-14)
- Switch from proto2 to proto3
- Fix
hex_http:bodytype - Fix
hex_http:requestspec
v0.2.1 (2018-12-13)
- Always return the whole response tuple from requests
- Guess rebar3 as build tool over rebar
- Return compressed tarball from hex_tarball:create_docs/1
- Add package identity to registry records
v0.2.0 (2018-09-01)
- Accept
{filename(), filename()}in files list for tarballs - Support httpc profile through adapter configs
- Update generated protobuf files with OTP 21 compatibility
v0.1.1 (2018-08-11)
- Use
hex_coreproject name in user agent string
v0.1.0 (2018-08-08)
- First release