-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from matusso/sonarcloud-integration
Sonarcloud integration
- Loading branch information
Showing
4 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: SonarCloud Scan - Metasploit Framework | ||
|
||
on: | ||
push: | ||
branches: | ||
- sonarcloud-integration | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
sonarcloud-metasploit: | ||
name: Scan Metasploit Framework | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Metasploit Framework Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: rapid7/metasploit-framework | ||
path: metasploit-framework # Optional: Clone into a specific directory | ||
ref: '6.4.38' | ||
|
||
- name: Install libpcap | ||
run: sudo apt update && sudo apt install -y libpcap-dev | ||
|
||
# Set up Ruby environment | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2.5' # Adjust to required version | ||
bundler-cache: true | ||
|
||
# Install Ruby dependencies | ||
- name: Install Ruby dependencies | ||
run: | | ||
cd metasploit-framework | ||
bundle install --path vendor/bundle | ||
# SonarCloud Scan for Metasploit Framework | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@v4 | ||
continue-on-error: true | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.organization=matusso | ||
-Dsonar.projectKey=docker-builds:metasploit-framework | ||
-Dsonar.verbose=true | ||
-Dsonar.projectName=metasploit-framework | ||
-Dsonar.languages=ruby | ||
-Dsonar.sources=metasploit-framework | ||
-Dsonar.exclusions=**/*.java,**/*.c,**/*.cpp,**/*.h,**/*.mm,**/*.m | ||
-Dsonar.c.file.suffixes=- | ||
-Dsonar.cpp.file.suffixes=- | ||
-Dsonar.objc.file.suffixes=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: SonarCloud Scan - mvt-project | ||
|
||
on: | ||
push: | ||
branches: | ||
- sonarcloud-integration | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
sonarcloud-mvt: | ||
name: Scan mvt-project | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the RouterSploit repository | ||
- name: Checkout mvt-project Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: mvt-project/mvt | ||
path: mvt # Optional: Clone into a specific directory | ||
ref: 'v2.5.4' | ||
|
||
# Set up Python 3.13 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.13' | ||
|
||
# Install Python dependencies | ||
- name: Install Python dependencies | ||
run: | | ||
cd mvt | ||
sudo apt update && sudo apt install -y \ | ||
build-essential \ | ||
git \ | ||
autoconf \ | ||
automake \ | ||
libtool-bin \ | ||
pkg-config \ | ||
libcurl4-openssl-dev \ | ||
libusb-1.0-0-dev \ | ||
libssl-dev \ | ||
udev \ | ||
&& sudo rm -rf /var/lib/apt/lists/* | ||
# SonarCloud Scan for RouterSploit | ||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarqube-scan-action@v4 | ||
continue-on-error: true | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.organization=matusso | ||
-Dsonar.projectKey=docker-builds:mvt-project | ||
-Dsonar.verbose=true | ||
-Dsonar.python.version=3.13 | ||
-Dsonar.projectName=mvt-project | ||
-Dsonar.sources=mvt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: SonarCloud Scan - RouterSploit | ||
|
||
on: | ||
push: | ||
branches: | ||
- sonarcloud-integration | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
sonarcloud-routersploit: | ||
name: Scan RouterSploit | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the RouterSploit repository | ||
- name: Checkout RouterSploit Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: threat9/routersploit | ||
path: routersploit # Optional: Clone into a specific directory | ||
ref: 'v3.4.6' | ||
|
||
# Set up Python 3.13 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.13' | ||
|
||
# Install Python dependencies | ||
- name: Install Python dependencies | ||
run: | | ||
cd routersploit | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
# SonarCloud Scan for RouterSploit | ||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarqube-scan-action@v4 | ||
continue-on-error: true | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.organization=matusso | ||
-Dsonar.projectKey=docker-builds:routersploit | ||
-Dsonar.verbose=true | ||
-Dsonar.python.version=3.13 | ||
-Dsonar.projectName=routersploit | ||
-Dsonar.sources=routersploit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"sonarlint.connectedMode.project": { | ||
"connectionId": "matusso", | ||
"projectKey": "matusso_docker-builds" | ||
} | ||
} |