Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,36 @@ on:
env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # required to mint the crates.io OIDC token
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # merge-base needs real history

# A GitHub release can be cut from any commit, including one that never
# landed on main. Publishing is restricted to release tags that are
# actually contained in main.
- name: Refuse releases not contained in main
run: |
git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main \
|| { echo "::error::release commit $GITHUB_SHA is not contained in main"; exit 1; }

- uses: dtolnay/rust-toolchain@stable
- run: cargo test

- uses: rust-lang/crates-io-auth-action@v1
id: auth

- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
29 changes: 23 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to `gobin` are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.1]

### Fixed

- Replaced a `match` that current clippy flags as expressible with `?` in
`structures::types`. Behaviour is unchanged; the lint did not exist when CI
last ran, and the workflow pins `@stable`, so it now fails the `-D warnings`
gate on every build.

### Changed

- Recorded ATRAPS LLC as copyright holder and added a `NOTICE` file. No functional change.
- Dropped the deprecated `authors` field and repointed `repository` at the organisation.
- Refreshed transitive dependencies (`cargo update`); no direct dependency changed version.
- Publishing now uses crates.io trusted publishing instead of a stored registry token.

## [0.4.0]

### Added
Expand Down Expand Up @@ -579,9 +595,10 @@ Initial public release.
- Type descriptor extraction via `.typelink` and descriptor walking.
- Heuristic confidence scoring (`Confidence` enum).

[0.4.0]: https://github.com/BinFlip/gobin/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/BinFlip/gobin/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/BinFlip/gobin/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/BinFlip/gobin/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/BinFlip/gobin/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/BinFlip/gobin/releases/tag/v0.1.0
[0.4.1]: https://github.com/ATRAPSLLC/gobin/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/ATRAPSLLC/gobin/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/ATRAPSLLC/gobin/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/ATRAPSLLC/gobin/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/ATRAPSLLC/gobin/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/ATRAPSLLC/gobin/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/ATRAPSLLC/gobin/releases/tag/v0.1.0
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[package]
name = "gobin"
version = "0.4.0"
version = "0.4.1"
edition = "2024"
authors = ["Johann Kempter <admin@binflip.rs>"]
rust-version = "1.88"
description = "Static analysis library for Go compiled binaries - identification and metadata extraction"
license = "Apache-2.0"
repository = "https://github.com/BinFlip/gobin"
repository = "https://github.com/ATRAPSLLC/gobin"
readme = "README.md"
keywords = ["golang", "go", "parser", "reverse-engineering", "binary-analysis"]
categories = ["parser-implementations"]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

END OF TERMS AND CONDITIONS

Copyright 2025 Johann Kempter
Copyright 2026 ATRAPS LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
24 changes: 24 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
gobin
Copyright 2026 ATRAPS LLC

This product includes software developed by ATRAPS LLC.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

----

This project includes the following third-party software:

Third-party dependencies are listed in Cargo.toml and their licenses
can be found in their respective repositories. All dependencies are
compatible with the Apache 2.0 license.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ numbers for version detection, but future Go releases may introduce changes.

## License

Apache-2.0
Copyright 2026 ATRAPS LLC. Licensed under the Apache License,
Version 2.0. See `LICENSE` and `NOTICE`.
8 changes: 2 additions & 6 deletions src/structures/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,12 +1164,8 @@ fn build_go_type<'a>(
// the bare `FuncTypeExtra::SIZE` here would land the `UncommonType`
// parse short by the padding, yielding a garbage `mcount`/`moff`.
// Mirror `descriptor::descriptor_size`'s accounting.
TypeKind::Func => {
match align_up(base_sz.saturating_add(FuncTypeExtra::SIZE), ps as usize) {
Some(off) => off.saturating_sub(base_sz),
None => return None,
}
}
TypeKind::Func => align_up(base_sz.saturating_add(FuncTypeExtra::SIZE), ps as usize)?
.saturating_sub(base_sz),
TypeKind::Interface => InterfaceTypeExtra::size(ps),
TypeKind::Map => MapTypeExtra::size(ps),
TypeKind::Pointer | TypeKind::Slice => ElemTypeExtra::size(ps),
Expand Down
Loading