Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Publish container file on docker/ghcr.io #34

Open
7677865466 opened this issue Feb 3, 2025 · 5 comments
Open

Publish container file on docker/ghcr.io #34

7677865466 opened this issue Feb 3, 2025 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@7677865466
Copy link

7677865466 commented Feb 3, 2025

Have recently stumbled upon Cyberbro and am enjoying it so far. I saw you have published a Kasm container image but there doesn't seem to be a container image for the vanilla application. Are you also able to publish this through docker or the Github container registry?

@stanfrbd
Copy link
Owner

stanfrbd commented Feb 3, 2025

Hey @7677865466

Thanks for bringing that up. Actually I thought about it but if I publish an image, it will be only with "free" engines without API keys (just like the KASM version).

Do you have limitations or a specific environment where you need a Docker image instead of using Docker Compose?

It's all about config (secrets.json).
KASM is good for testing purposes.

I am open to discussion about this :)

@7677865466
Copy link
Author

The main reason for me is that it is easier to deploy and update the image to a newer version whenever a new version of Cyberbro is released. You can also consider using environment variables to make deployment even more easier as there is no config file needed. By doing so, you can add all the third-party secrets to the compose file.

I am using podman quadlet (opposed to docker-compose) and they have a built-in updater that checks and updates the image if a new container image has been published.

@stanfrbd
Copy link
Owner

stanfrbd commented Feb 3, 2025

That makes sense! I will think about it :)
I'll reach out when I have something ready!

@stanfrbd
Copy link
Owner

stanfrbd commented Feb 7, 2025

Hello @7677865466

I'm planning to release the docker image soon (probably today)

Advanced options for deployment

All variables from secrets.json can be converted to environment variables (uppercase):

Note

You can add these environment variables in a custom docker-compose.yml. If you don't specify proxy, no proxy will be used.

export PROXY_URL="http://127.0.0.1:9000"
export VIRUSTOTAL="api_key_here"
export ABUSEIPDB="api_key_here"
export IPINFO="api_key_here"
export GOOGLE_SAFE_BROWSING="api_key_here"
export MDE_TENANT_ID="api_key_here"
export MDE_CLIENT_ID="api_key_here"
export MDE_CLIENT_SECRET="api_key_here"
export SHODAN="api_key_here"
export OPENCTI_API_KEY="api_key_here"
export OPENCTI_URL="https://demo.opencti.io"

Supervisord options (for docker only)

This options will be applied only if the script prod/advanced_config.py is run (automatic in docker)

In secrets.json:

  • Adding "supervisord_workers_count": 1 in secrets.json will set -w 1 in supervisord.conf
  • Adding "supervisord_threads_count": 1 in secrets.json will set -t 1 in supervisord.conf
  • Adding "supervisord_timeout": 200 in secrets.json will set --timeout 200 in supervisord.conf

Or using environment variables:

export SUPERVISORD_WORKERS_COUNT=1
export SUPERVISORD_THREADS_COUNT=1
export SUPERVISORD_TIMEOUT=200

Note

These variables are optional, so if they don't exist in secrets.json, the original config (in prod/supervisord.conf) will be applied by default.

API prefix in app.py and index.html options

In secrets.json:

  • Adding "api_prefix": "my_api" in secrets.json will set all the original prefix /api/ endpoints to be renamed by prefix /my_api/ endpoints in the files app.py and index.html

Or using environment variables:

export API_PREFIX="my_api"

Note

This variable is optional, so if it doesn't exist in secrets.json, the API will be accessible at /api/ by default.

Selected engines in the GUI (index.html only)

In secrets.json:

  • Adding "gui_enabled_engines": ["reverse_dns", "rdap"] in secrets.json will restrict usage of these two engines in the GUI.

Or using environment variables:

export GUI_ENABLED_ENGINES="reverse_dns,rdap"

Note

This variable is optional, so if it doesn't exist in secrets.json, all engines will be displayed in the GUI.

Tip

Example: for the demo instance of cyberbro, only these engines are used:
"gui_enabled_engines": ["reverse_dns", "rdap", "ipquery", "abuseipdb", "virustotal", "spur", "google_safe_browsing", "shodan", "phishtank", "threatfox", "urlscan", "google", "github", "opencti", "abusix", "hudsonrock"]
With environment variable: GUI_ENABLED_ENGINES="reverse_dns,rdap,ipquery,abuseipdb,virustotal,spur,google_safe_browsing,shodan,phishtank,threatfox,urlscan,google,github,opencti,abusix,hudsonrock"

Config page in the GUI (config.html) http://cyberbro.local:5000/config

Caution

This is unsecure so it is disabled by default.

You can add it using the following:

In secrets.json:

Adding "config_page_enabled": true in secrets.json will enable the config page in the GUI at http://cyberbro.local:5000/config

Or using environment variables:

export CONFIG_PAGE_ENABLED="true"

Note

This variable is optional, so if it doesn't exist in secrets.json, it will be disabled by default.

@stanfrbd stanfrbd self-assigned this Feb 7, 2025
@stanfrbd stanfrbd added the enhancement New feature or request label Feb 7, 2025
stanfrbd added a commit that referenced this issue Feb 7, 2025
Advanced config - Ability to avoid secrets.json if ENV variables are provided - useful for Container deployment #34
@stanfrbd
Copy link
Owner

stanfrbd commented Feb 7, 2025

@7677865466 you will be able to use the image ghcr.io/stanfrbd/cyberbro:latest

Example of docker-compose-custom.yml (note: no " in environment variables)

services:
  web:
    image: ghcr.io/stanfrbd/cyberbro:latest
    container_name: cyberbro
    ports:
      - "5000:5000"
    environment:
      - FLASK_ENV=production
      - VIRUSTOTAL=api_key_here
      - ABUSEIPDB=api_key_here
      - GUI_ENABLED_ENGINES=reverse_dns,rdap,ipquery,abuseipdb,virustotal,spur,google_safe_browsing,phishtank
    restart: always
    volumes:
      - ./data:/app/data
      - ./logs:/var/log/cyberbro

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants