Skip to content

Commit

Permalink
Release v1.4.0 (#371)
Browse files Browse the repository at this point in the history
* Update version for new release

* Update app environment in rollbar config for new release

* Update changelog filters for goreleaser to make improve changelogs

* Minor: Add 2024 Roadmap to README

Also update changelog filter in goreleaser config to be more robust

* Minor: Add issue #367 to 2024 roadmap in README

* Add Initial Dockerfile (#368)

* Add initial Dockerfile

* Add docker info in install section of README

* Update Docker run command to remove after run

This should help prevent users accumulating unneeded IP2CR images after each run

* Check `Docker Support` Issue Off Roadmap in README

* Add Github Actions Workflow For Container Publish (#369)

* Add initial Dockerfile

* Add docker info in install section of README

* Update Docker run command to remove after run

This should help prevent users accumulating unneeded IP2CR images after each run

* Check `Docker Support` Issue Off Roadmap in README

* Add container publish Github Actions workflow

* Update GHCR password secret nemat

Docs note that using this format will allow GA to auto generate a token for pakcage publishing.

* Update README to include container registry install options

* Add Logo to README (#370)

- Other minor fixes in README

* Update code for release prep
  • Loading branch information
magneticstain authored Jan 20, 2024
1 parent f8542a2 commit a82ce31
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 11 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# REF: https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-docker-hub-and-github-packages

name: Publish Docker Image

on:
release:
types: [published]

jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
magneticstain/ip-2-cloudresource
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
9 changes: 4 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^[Dd]eploy: '
- '^[Mm]inor: '
- '^[Tt]est: '
- '^Merge '
release:
github:
owner: magneticstain
Expand Down Expand Up @@ -65,6 +67,3 @@ brews:
name: homebrew-ip2cr

token: "{{ .Env.HOMEBREW_GITHUB_TOKEN }}"

# pull_request:
# enabled: true
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# syntax=docker/dockerfile:1

FROM golang:alpine3.19

WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download && go mod verify

COPY . .
RUN go build -o ./ip2cr

ENTRYPOINT [ "./ip2cr" ]
CMD [ "--help" ]
48 changes: 43 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# ip-2-cloudresource
![IP2CR Logo](./assets/logo-transparent.png)

---

[![Build and Test - Main Branch](https://github.com/magneticstain/ip-2-cloudresource/actions/workflows/build_main.yml/badge.svg)](https://github.com/magneticstain/ip-2-cloudresource/actions/workflows/build_main.yml)
[![Build and Test - Release Branches](https://github.com/magneticstain/ip-2-cloudresource/actions/workflows/build_release.yml/badge.svg)](https://github.com/magneticstain/ip-2-cloudresource/actions/workflows/build_release.yml)
Expand All @@ -7,7 +9,7 @@
[![Codacy Badge - Quality](https://app.codacy.com/project/badge/Grade/5137ec7cf2d14a9c9fc3eac1cd37e0d3)](https://app.codacy.com/gh/magneticstain/ip-2-cloudresource/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge - Coverage](https://app.codacy.com/project/badge/Coverage/5137ec7cf2d14a9c9fc3eac1cd37e0d3)](https://app.codacy.com/gh/magneticstain/ip-2-cloudresource/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/magneticstain/ip-2-cloudresource/v1.3.0)
![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/magneticstain/ip-2-cloudresource/v1.4.0)
![GitHub issues](https://img.shields.io/github/issues/magneticstain/ip-2-cloudresource)
![GitHub pull requests](https://img.shields.io/github/issues-pr/magneticstain/ip-2-cloudresource)
![GitHub all releases](https://img.shields.io/github/downloads/magneticstain/ip-2-cloudresource/total)
Expand All @@ -16,7 +18,7 @@

IP-2-CloudResource (IP2CR) is a tool used for correlating a cloud IP address with its associated resources. It focuses on providing as much context to the user as possible, as fast as possible.

![IP2CR Demo](https://raw.githubusercontent.com/magneticstain/ip-2-cloudresource/main/assets/demo.gif)
![IP2CR Demo](./assets/demo.gif)

## Features

Expand Down Expand Up @@ -44,6 +46,12 @@ IP-2-CloudResource (IP2CR) is a tool used for correlating a cloud IP address wit
- [X] Add Support For Concurrent Account-Based Resource Searches When Running With AWS Org Support ( [Issue #141](https://github.com/magneticstain/ip-2-cloudresource/issues/141) )
- [X] Network path calculation ( [Issue #44](https://github.com/magneticstain/ip-2-cloudresource/issues/44) )

#### 2024

- [X] Docker Support ( [Issue #367](https://github.com/magneticstain/ip-2-cloudresource/issues/367) )
- [ ] GCP Support ( [Issue #361](https://github.com/magneticstain/ip-2-cloudresource/issues/361) )
- [ ] Azure Support ( [Issue #362](https://github.com/magneticstain/ip-2-cloudresource/issues/362) )

## Prerequisites

### OS
Expand All @@ -59,6 +67,36 @@ IP2CR supports running on n-1 minor versions of Golang, aka [stable and old-stab

## Install

### Docker

The most portable way to install and run IP2CR is by using Docker.

#### Via Container Registry

The easiest way to run IP2CR in Docker is by using the public containers hosted on container registries. IP2CR images are available on both Docker Hub and GitHub Container Registry. See the commands below for how to run IP2CR using each registry.

##### Docker Hub

```bash
docker run --rm --name=ip-2-cloudresource magneticstain/ip-2-cloudresource
```

##### Github Container Registry

```bash
docker run --rm --name=ip-2-cloudresource ghcr.io/magneticstain/ip-2-cloudresource
```

#### Via Local Build

In the case that container registries are unavailable, there's also the option to build the image locally. To do that, check out the `main` branch of this repo, build the IP2CR image, and run it.

```bash
git clone https://github.com/magneticstain/ip-2-cloudresource.git
docker build -t ip-2-cloudresource .
docker run --rm --name=ip-2-cloudresource ip-2-cloudresource
```

### Homebrew

The easiest way to install IP2CR if you're using Mac OS is to use [Homebrew](https://brew.sh). With homebrew installed, run the following to install IP2CR:
Expand Down Expand Up @@ -95,8 +133,8 @@ cd /opt/ip2cr/
After installing, run the `ip2cr` binary to see available parameters:

```bash
> ./ip2cr --help
Usage of ./ip2cr:
> ip2cr --help
Usage of ip2cr:
-adv-ip-fuzzing
Toggle the advanced IP fuzzing feature to perform a more intensive heuristics evaluation to fuzz the service (not recommended for IPv6 addresses) (default true)
-ip-fuzzing
Expand Down
Binary file added assets/logo-transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/magneticstain/ip-2-cloudresource/utils"
)

const APP_VER = "v1.3.0"
const APP_VER = "v1.4.0"

func outputResults(matchedResource resource.Resource, networkMapping bool, silent bool, jsonOutput bool) {
acctAliasFmted := strings.Join(matchedResource.AccountAliases, ", ")
Expand Down

0 comments on commit a82ce31

Please sign in to comment.