Git Product home page Git Product logo

codeartifact-dependabot-sync's Introduction

codeartifact-dependabot-sync

Many people are using private registries like AWS CodeArtifact to store critical code and distribute it within a controlled domain. Dependabot is a GitHub integrated tool that allows for dependency analysis with automatic pull requests and alerts for repositories. As the name suggests, private registries are only allowed to be accessed by people and systems that have access.

Until recently, Dependabot's only option to access private registries was to add secrets through the UI. Now they offer additional API operations for programmatically adding secrets to Dependabot.

This project aims to become a tool for people who are using AWS CodeArtifact and want to use Dependabot with it. The codeartifact-dependabot-sync enables you to automatically update your secret every 10 hours.

Getting started

The following instructions show how to setup the environment to run this code within a given environment.

Prerequisites

Installation

  1. clone the repo

    git clone https://github.com/TierMobility/codeartifact-dependabot-sync
    
    cd codeartifact-dependabot-sync
  2. (optional) get all modules

    export GO111MODULE=on
    go get .
  3. Build it

    GO111MODULE=on go build . -o /codeartifact-dependabot-sync

How to use

the tool runs indefinitely until the process is killed

  • Setup the following data:

    Key Description
    CODEARTIFACT_DOMAIN_OWNER Owner (AWS acc) for the AWS CodeArtifact domain. Also used when using CodeArtifact with AWS Cli
    CODEARTIFACT_DURATION Duration of the AWS CodeArtifact authToken.
    CODEARTIFACT_DOMAIN AWS CodeArtifact Domain for which access is required. Also used when using CodeArtifact with AWS Cli
    GITHUB_PRIVATE_KEY GitHub secret for GitHub App authentication
    DEPENDABOT_OWNER Owner of the GitHub organization
    DEPENDABOT_ORG The GitHub organization for which the secret should be created
    GITHUB_APP_ID The ID of the GitHub App used for authentication
  • Using env variables

    1. Setup environment variables regarding point 1 from installation

    2. ./codeartifact-dependabot-sync
  • Using flags

    1. The flags for the tool are the same as demonstrated in point 1 from installation.

      # Get all the flags and their descriptions:
      ./codeartifact-dependabot-sync -h
      
      # run it with flag data
      ./codeartifact-dependabot-sync -DEPENDABOT-ORG=exampleOrg -CODEARTIFACT_OWNER=exampleOwner ...

codeartifact-dependabot-sync's People

Contributors

tohanl avatar heimweh avatar sostnl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.