A GitHub Action to find hardcoded IP addresses in files. This action scans specified directories in your repository for hardcoded IP addresses and helps you maintain code quality and security.
- Checks for hardcoded IP addresses in specified directories.
- Customizable input for directory selection.
- Supports user-defined file extensions for checking.
- Option to combine user-defined extensions with default ones.
- Easy integration into your GitHub workflows.
- File Extension Support: You can now specify which file types to scan for hardcoded IP addresses.
- Combine Extensions Option: A new option allows users to combine their specified extensions with the default extensions for a more comprehensive check.
This action checks for hardcoded IP addresses in the following file types:
- C# (
.cs) - Python (
.py) - JavaScript (
.js) - JSON (
.json) - Java (
.java) - TypeScript (
.ts)
| Input | Description | Required | Default |
|---|---|---|---|
directories |
Comma-separated list of directories to check (e.g., src,app,config). |
Yes | . |
extensions |
Comma-separated list of file extensions to check (e.g., .cs,.py,.js). |
No | (empty, checks defaults) |
combine_extensions |
Set to true if you want to combine the provided extensions with the default ones. |
No | false |
To use this action in your workflow, create a .github/workflows/ip-check.yml file in your repository:
name: Check for Hardcoded IPs
on:
push:
branches:
- main
pull_request:
jobs:
check-ips:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Run IP Check
uses: dprakash2101/hardcoded_ip_check@v1.0.0 # Use the latest version
with:
directories: 'src, app, config' # Specify directories to check
extensions: '.cs,.py' # Optionally specify extensions to check
combine_extensions: 'true' # Set to true to combine with default extensions
This project is licensed under the MIT License. See the LICENSE file for details.
This project is maintained by Devi Prakash Kandikonda.