Socket
Socket
Sign inDemoInstall

gitlab-api-filter

Package Overview
Dependencies
110
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitlab-api-filter

Expose selected APIs of gitlab


Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Install size
5.75 MB
Created
Weekly downloads
 

Readme

Source

Actions Status

GitLab API Filter

A delegate to limit the scope of GitLab APIs.

Sometimes, GitLab's APIs are too dangerous to be exposed fully. This project acts as a delegate, it can control which part of the APIs are allowed.

Installation

$ npm install -g gitlab-api-filter

Setup

Create a configuration file: gitlab-api-filter.jsonc:

blacklist contains a list of APIs that should be blocked. whitelist contains a list of APIs that should be exposed.

accessToken or environment variable GITLAB_AF_ACCESS_TOKEN contains the Personal Access Token, which is acquired from https://gitlab.example.com/profile/personal_access_tokens

Start

$ gitlab-api-filter
Starting server with options...
port: 8080
upstream.url: https://gitlab.xxx.com
upstream.accessToken: xxxxxxxxxxxxxxxxxxxx
blacklist: [
  "/api/v4/projects/:id/repository*",
  "/api/v4/projects/:id/search"
]
whitelist: [
  "/api/v4/projects/:id/repository/branches",
  "/api/v4/projects/:id/repository/tags",
  "/api/v4/projects/:id/repository/commits"
]
Server started at http://localhost:8080

Changelog

  • 1.3.0 2020-09-15 Support secret. Fix missing response header such as 'x-page'.
  • 1.2.2 2020-09-15 Add 'blacklist'. Rename 'filters' to 'whitelist'. Rename 'url' and 'accessToken' to 'upstream.url' and 'upstream.accessToken'.

Keywords

FAQs

Last updated on 15 Sep 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc