Skip to content

Sonar qube and Nmap #46

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 272 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
6e4c5fb
aaa
a-efstathiou Sep 9, 2024
e28e721
a
a-efstathiou Sep 9, 2024
6121a63
A
a-efstathiou Sep 9, 2024
0d541d0
a
a-efstathiou Sep 9, 2024
dd00bd9
a
a-efstathiou Sep 9, 2024
6733d82
a
a-efstathiou Sep 9, 2024
5b76ee7
tried to make trufflehog run locally
a-efstathiou Sep 9, 2024
1fe16d7
added checkout scm stage
a-efstathiou Sep 9, 2024
2a3be9e
fixed checkout stage
a-efstathiou Sep 9, 2024
e4c07a8
docker trufflehog
a-efstathiou Sep 10, 2024
2c7bc59
trufflehog git option
a-efstathiou Sep 10, 2024
a4dd84d
docker testing in container
a-efstathiou Sep 10, 2024
f7e37bd
changed docker-compose to allow sockets
a-efstathiou Sep 10, 2024
020b346
test
a-efstathiou Sep 10, 2024
d78dc7c
TEST 2
nikolas2000 Sep 10, 2024
879815f
added docker agent
a-efstathiou Sep 10, 2024
6cc26f9
removed mount socket
a-efstathiou Sep 10, 2024
f9e618d
added docker agent node
a-efstathiou Sep 10, 2024
5b8dd81
fix agent label (?)
a-efstathiou Sep 10, 2024
3b25c82
test docker
a-efstathiou Sep 10, 2024
b5462ed
test 2 agent
a-efstathiou Sep 10, 2024
9613e4c
added jenkins user to docker group
a-efstathiou Sep 10, 2024
8b610b4
fixed docker problem + added trufflehog to scan the repo
a-efstathiou Sep 11, 2024
aebc17d
test commit
a-efstathiou Sep 11, 2024
9d64909
fixed trufflehog
a-efstathiou Sep 11, 2024
ce9c25f
removed -it tag on trufflehog
a-efstathiou Sep 11, 2024
0aaa1d5
check if pipelines triggers on commit
a-efstathiou Sep 11, 2024
d449506
added forgotten password keys.txt
a-efstathiou Sep 11, 2024
b9cc8a7
test key detection
a-efstathiou Sep 11, 2024
42f824f
test
a-efstathiou Sep 11, 2024
6e85263
tests to check git status
a-efstathiou Sep 11, 2024
e5130cd
test
a-efstathiou Sep 11, 2024
d34c99f
a
a-efstathiou Sep 11, 2024
b6dbc5e
a
a-efstathiou Sep 11, 2024
bac3d12
a
a-efstathiou Sep 11, 2024
1a536ed
a
a-efstathiou Sep 11, 2024
2719285
fixed workspace in git
a-efstathiou Sep 11, 2024
00cddef
test with workspace
a-efstathiou Sep 11, 2024
99b42dc
fix
a-efstathiou Sep 11, 2024
9833b5f
fix 2
a-efstathiou Sep 11, 2024
94c5a87
a
a-efstathiou Sep 11, 2024
afeeb57
fix
a-efstathiou Sep 11, 2024
8777052
fix
a-efstathiou Sep 11, 2024
a59d15c
a
a-efstathiou Sep 11, 2024
4e85175
fix ?
a-efstathiou Sep 11, 2024
23a6cb9
final fix ?
a-efstathiou Sep 11, 2024
16fdfda
a
a-efstathiou Sep 11, 2024
8d6b443
test key trufflehog detection
a-efstathiou Sep 11, 2024
dca6f6b
TEST 3
nikolas2000 Sep 11, 2024
d57c42c
TEST 3
nikolas2000 Sep 11, 2024
7a960c2
TEST 3
nikolas2000 Sep 11, 2024
09645f4
TEST 3
nikolas2000 Sep 11, 2024
f495f92
TEST 3
nikolas2000 Sep 11, 2024
2d3d89a
TEST 5
nikolas2000 Sep 11, 2024
5368da0
TEST 5
nikolas2000 Sep 11, 2024
18c24a4
a
a-efstathiou Sep 11, 2024
2ffe40e
test key detection commit
a-efstathiou Sep 11, 2024
8b5d3fe
new commit
a-efstathiou Sep 11, 2024
e0f8e84
TEST Semgrep
nikolas2000 Sep 11, 2024
4756192
TEST Semgrep
nikolas2000 Sep 11, 2024
a8db439
TEST Semgrep
nikolas2000 Sep 11, 2024
8b904e3
TEST Semgrep
nikolas2000 Sep 11, 2024
134bdf5
TEST Semgrep
nikolas2000 Sep 11, 2024
0a4e947
TEST Semgrep
nikolas2000 Sep 11, 2024
5c2b496
TEST Semgrep
nikolas2000 Sep 11, 2024
460e2ef
TEST Semgrep
nikolas2000 Sep 11, 2024
3043078
finished trufflehog hopefully
a-efstathiou Sep 11, 2024
4aa1351
finished trufflehog
a-efstathiou Sep 11, 2024
52c175a
final test commit (?)
a-efstathiou Sep 11, 2024
4108222
final final trufflehog
a-efstathiou Sep 11, 2024
df1c7e7
final final test commit
a-efstathiou Sep 11, 2024
c968df1
final commit ???
a-efstathiou Sep 11, 2024
7bd8464
truly final commit
a-efstathiou Sep 11, 2024
7c16874
removed commented lines on docker compose
a-efstathiou Sep 11, 2024
01107e1
keys copy for testing
a-efstathiou Sep 11, 2024
fbacd4f
jenkinsfile
a-efstathiou Sep 12, 2024
f9b188a
a
a-efstathiou Sep 12, 2024
3329ca6
fixed some things
a-efstathiou Sep 12, 2024
09a7238
a
a-efstathiou Sep 12, 2024
e2fb99c
trufflehog with local commits
a-efstathiou Sep 12, 2024
f8e6256
changed key file to check if pipeline works
a-efstathiou Sep 12, 2024
91cfabd
fixed some issues
a-efstathiou Sep 12, 2024
e77b2b2
change in key.txt to check if pipeline works
a-efstathiou Sep 12, 2024
198a67d
TEST Sonarqube
nikolas2000 Sep 12, 2024
92ba564
TEST Sonarqube
nikolas2000 Sep 12, 2024
3cc30aa
TEST Sonarqube
nikolas2000 Sep 12, 2024
bbb7ea9
a
a-efstathiou Sep 12, 2024
a1aa721
a
a-efstathiou Sep 12, 2024
976bacf
a
a-efstathiou Sep 12, 2024
a945abb
try with HEAD
a-efstathiou Sep 12, 2024
04eb122
test commit for secret scanning
a-efstathiou Sep 12, 2024
d487b55
change 2
a-efstathiou Sep 12, 2024
9303d82
without branch option
a-efstathiou Sep 12, 2024
aa4089b
a
a-efstathiou Sep 12, 2024
c1d543c
tried something else
a-efstathiou Sep 12, 2024
181e849
test
a-efstathiou Sep 12, 2024
aa121ef
TEST Sonarqube
nikolas2000 Sep 12, 2024
84fc5e4
TEST Sonarqube
nikolas2000 Sep 12, 2024
682ba0c
TEST Sonarqube
nikolas2000 Sep 12, 2024
07487bc
TEST Sonarqube
nikolas2000 Sep 12, 2024
9f65073
TEST Sonarqube
nikolas2000 Sep 12, 2024
c5faad9
a
a-efstathiou Sep 12, 2024
f875f60
TEST Sonarqube
nikolas2000 Sep 12, 2024
acaa37b
TEST Sonarqube
nikolas2000 Sep 12, 2024
4ed6adf
TEST Sonarqube
nikolas2000 Sep 12, 2024
48bd90f
TEST Sonarqube
nikolas2000 Sep 12, 2024
a221261
TEST Sonarqube
nikolas2000 Sep 12, 2024
3773d88
fixed jenkinsfile
a-efstathiou Sep 12, 2024
b2536c2
test commit
a-efstathiou Sep 12, 2024
8c81ac9
fixed?
a-efstathiou Sep 12, 2024
70ec886
test
a-efstathiou Sep 12, 2024
5fd9d07
final commit on secrets
a-efstathiou Sep 12, 2024
9e16379
Merge pull request #1 from a-efstathiou/secret-scanning
a-efstathiou Sep 13, 2024
82aee74
TEST Sonarqube
nikolas2000 Sep 13, 2024
8c2ef17
TEST Sonarqube
nikolas2000 Sep 13, 2024
97c119c
TEST Sonarqube
nikolas2000 Sep 13, 2024
5c8fd83
TEST Sonarqube
nikolas2000 Sep 13, 2024
3e65738
TEST Sonarqube
nikolas2000 Sep 13, 2024
e9574ae
TEST Sonarqube
nikolas2000 Sep 13, 2024
18b457e
TEST Sonarqube
nikolas2000 Sep 13, 2024
31e9c91
TEST Sonarqube
nikolas2000 Sep 13, 2024
e45ee75
TEST Sonarqube
nikolas2000 Sep 13, 2024
783d036
Add a static code error
nikolas2000 Sep 13, 2024
2baecd1
Add a static code error 2
nikolas2000 Sep 13, 2024
e6550c1
Add a static code error 2
nikolas2000 Sep 13, 2024
16de43b
Add a static code error 2
nikolas2000 Sep 14, 2024
8cf8792
Add a static code error 3
nikolas2000 Sep 14, 2024
671382e
Add a static code error 4
nikolas2000 Sep 14, 2024
022dc5a
Add a static code error 4
nikolas2000 Sep 14, 2024
51a5ef2
Add a static code error 6
nikolas2000 Sep 14, 2024
778c187
Add a static code error 6
nikolas2000 Sep 14, 2024
ac795b5
Add a static code error 6
nikolas2000 Sep 14, 2024
4db3cb0
Add a static code error 7
nikolas2000 Sep 14, 2024
3e6585d
Add a static code error 7
nikolas2000 Sep 14, 2024
7370193
Add a static code error 7
nikolas2000 Sep 14, 2024
8ed0de5
Add a static code error 7
nikolas2000 Sep 14, 2024
baec11b
Add a static code error 7
nikolas2000 Sep 14, 2024
5f4b70e
Add a static code error 88
nikolas2000 Sep 14, 2024
071a2d4
Add a static code error 88
nikolas2000 Sep 14, 2024
82d4385
Add a static code error 88 Test
nikolas2000 Sep 14, 2024
d0f34fe
Add static code analyzer test to Comment class
nikolas2000 Sep 14, 2024
c01f4c7
Add static code analyzer test to Comment class 2
nikolas2000 Sep 14, 2024
17eeb83
Add static code analyzer test to Comment class 2
nikolas2000 Sep 14, 2024
3843386
Add static code analyzer test to Comment class 3
nikolas2000 Sep 14, 2024
3444428
Add static code analyzer test to Comment class 3
nikolas2000 Sep 14, 2024
950860c
Add lINTERS test to Comment class 5
nikolas2000 Sep 14, 2024
3359dce
Add lINTERS test to Comment class 6
nikolas2000 Sep 14, 2024
d913f66
Add lINTERS test to Comment class 6
nikolas2000 Sep 14, 2024
eb48b5f
Add lINTERS test to Comment class 6
nikolas2000 Sep 14, 2024
434a5e4
Add lINTERS test to Comment class 6
nikolas2000 Sep 14, 2024
3f8d571
Add lINTERS test to Comment class 7
nikolas2000 Sep 15, 2024
76c6cb9
Add lINTERS test to Comment class 7
nikolas2000 Sep 15, 2024
5d393e6
Add lINTERS test to Comment class 7
nikolas2000 Sep 15, 2024
3f4e6b5
Add lINTERS test to Comment class 7
nikolas2000 Sep 15, 2024
7b777ab
Add nmap 1
nikolas2000 Sep 15, 2024
116565e
Add nmap 2
nikolas2000 Sep 15, 2024
369e3d0
Add nmap 2
nikolas2000 Sep 15, 2024
5622dfa
Add nmap 2
nikolas2000 Sep 15, 2024
acd8ccc
Add nmap 2
nikolas2000 Sep 15, 2024
04969e0
Add nmap 2
nikolas2000 Sep 15, 2024
1ae407c
Add nmap 3
nikolas2000 Sep 15, 2024
895771b
Add nmap 3
nikolas2000 Sep 15, 2024
251e071
Add nmap 3
nikolas2000 Sep 15, 2024
296ad44
Add nmap 3
nikolas2000 Sep 15, 2024
3c4fe5b
Add nmap 3
nikolas2000 Sep 15, 2024
0ff4383
Add nmap 4
nikolas2000 Sep 15, 2024
0d4f06f
Add nmap 4
nikolas2000 Sep 15, 2024
4d9143e
Add nmap 4
nikolas2000 Sep 15, 2024
1766940
Add nmap 4
nikolas2000 Sep 15, 2024
20d500c
Add nmap 5
nikolas2000 Sep 15, 2024
50449c1
Add nmap 5
nikolas2000 Sep 15, 2024
c07ca01
Add nmap 5
nikolas2000 Sep 15, 2024
1fb3906
Add nmap 5
nikolas2000 Sep 15, 2024
f958c59
Add nmap 67
nikolas2000 Sep 15, 2024
6013139
Add nmap 677
nikolas2000 Sep 15, 2024
ec673ec
Add nmap 6734
nikolas2000 Sep 15, 2024
eade09b
Add nmap 6736
nikolas2000 Sep 15, 2024
b25266b
snyk + sqlmap
a-efstathiou Sep 15, 2024
86be415
a
a-efstathiou Sep 15, 2024
d4c48e5
fix
a-efstathiou Sep 15, 2024
4396e99
a
a-efstathiou Sep 15, 2024
3ce0096
a
a-efstathiou Sep 15, 2024
543c92c
a
a-efstathiou Sep 15, 2024
a6e5669
a
a-efstathiou Sep 15, 2024
7873d82
Add nmap 673635
nikolas2000 Sep 15, 2024
12bd7de
a
a-efstathiou Sep 15, 2024
d2ce6b7
a
a-efstathiou Sep 15, 2024
256c15c
fix
a-efstathiou Sep 15, 2024
751e7fe
a
a-efstathiou Sep 15, 2024
aedd32d
Add nmap TEST 1
nikolas2000 Sep 15, 2024
e5e1d6e
Add nmap TEST 2
nikolas2000 Sep 15, 2024
aa08636
Add nmap TEST 3
nikolas2000 Sep 15, 2024
dba8a25
Add nmap TEST 4
nikolas2000 Sep 15, 2024
75e467f
Add nmap TEST 5
nikolas2000 Sep 15, 2024
57b1386
as
a-efstathiou Sep 15, 2024
6969c65
Add nmap TEST 5
nikolas2000 Sep 15, 2024
e85b023
Add nmap TEST 6
nikolas2000 Sep 15, 2024
2948a48
fix
a-efstathiou Sep 15, 2024
e7c3472
Add nmap TEST 7
nikolas2000 Sep 15, 2024
483380c
Add nmap TEST 8
nikolas2000 Sep 15, 2024
13a202e
Add nmap TEST 9
nikolas2000 Sep 15, 2024
aa8a4c2
final check?
a-efstathiou Sep 15, 2024
a6bee23
test commit
a-efstathiou Sep 15, 2024
14c8f77
test
a-efstathiou Sep 15, 2024
39aaeea
Add nmap TEST 9
nikolas2000 Sep 15, 2024
df61ba4
fix
a-efstathiou Sep 15, 2024
eb4b674
test1
a-efstathiou Sep 15, 2024
2e7d8b7
fix
a-efstathiou Sep 15, 2024
c32f2ab
parallel stages
a-efstathiou Sep 15, 2024
025adc7
test
a-efstathiou Sep 15, 2024
c53e3cb
fix parallel
a-efstathiou Sep 15, 2024
e5f349b
test
a-efstathiou Sep 15, 2024
286067c
Add nmap TEST 9
nikolas2000 Sep 15, 2024
13508e6
fix?
a-efstathiou Sep 15, 2024
d7fb0f5
fix
a-efstathiou Sep 15, 2024
b241423
Add nmap TEST 9
nikolas2000 Sep 15, 2024
24a3442
Add nmap TEST 9
nikolas2000 Sep 15, 2024
92da38e
Add nmap TEST 9
nikolas2000 Sep 15, 2024
a1c8eb5
Add nmap TEST 9
nikolas2000 Sep 15, 2024
a4cf0ee
Add nmap TEST 10
nikolas2000 Sep 15, 2024
23ffc5c
Merge remote-tracking branch 'origin/code-checking' into code-checking
nikolas2000 Sep 15, 2024
4d5638e
sequential again
a-efstathiou Sep 15, 2024
0791e53
Add nmap TEST 10
nikolas2000 Sep 15, 2024
54577f3
test commit
a-efstathiou Sep 15, 2024
df02b70
Add nmap Last
nikolas2000 Sep 15, 2024
de6dd31
completed pipeline kinda
a-efstathiou Sep 15, 2024
ef3fc8f
create branch with finished code
a-efstathiou Sep 15, 2024
8a30c84
Merge pull request #2 from a-efstathiou/finished-pipeline
a-efstathiou Sep 15, 2024
4075d28
check
a-efstathiou Sep 15, 2024
81507d8
fixed
a-efstathiou Sep 15, 2024
af5216c
test 1
a-efstathiou Sep 15, 2024
17ba437
Add nmap Last 1
nikolas2000 Sep 15, 2024
bd5401e
tests
a-efstathiou Sep 15, 2024
3244a9c
print tests in setting environment variables
a-efstathiou Sep 15, 2024
136827a
test
a-efstathiou Sep 15, 2024
d4f612a
fixed parameters
a-efstathiou Sep 15, 2024
7c4aad6
test commit
a-efstathiou Sep 15, 2024
a4e9066
Add nmap Last Ports add
nikolas2000 Sep 15, 2024
678d766
Add nmap Last Ports add 2
nikolas2000 Sep 15, 2024
51755e7
Add nmap Last Ports add 2
nikolas2000 Sep 15, 2024
ba735eb
Add nmap Last Ports add 4
nikolas2000 Sep 15, 2024
f9249d5
tests
a-efstathiou Sep 15, 2024
8efa7cf
fixes
a-efstathiou Sep 15, 2024
09b69cf
Merge pull request #3 from a-efstathiou/tests
a-efstathiou Sep 15, 2024
0205f2d
Merge branch 'master' into code-checking
nikolas2000 Sep 16, 2024
8fa9b87
Add nmap Last Ports add 5
nikolas2000 Sep 16, 2024
c6215fb
Add nmap Last Ports add 5
nikolas2000 Sep 16, 2024
452f84b
Add nmap Last Ports add 5
nikolas2000 Sep 16, 2024
0c8bd17
Add nmap Last Ports add 5
nikolas2000 Sep 16, 2024
8022405
Add nmap Last Ports add 5
nikolas2000 Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 18 additions & 23 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
pipeline {
agent any
parameters {
string name: 'dockerComposePath', defaultValue: "", description: "Path of the docker-compose.yml"
string name: 'dockerfilePath', defaultValue: "", description: "Path of the Dockerfile"
base64File description: 'File containing the endpoints to be tested by SQLmap', name: 'endpoints'
parameters{
string(name: 'dockerComposePath', defaultValue: '', description: 'Path of the docker-compose.yml')
string(name: 'dockerfilePath', defaultValue: '', description: 'Path of the Dockerfile')
string(name: 'endpointsPath', defaultValue: '', description: 'Path of the endpoints to test SQLmap')
}
environment {
REPO_URL = ''
CURR_BRANCH = ''
workspace = ''
relativeWorkspacePath = ''
SNYK_TOKEN = credentials('snyk-token')
IMAGES = ''
}
images_string = ''
}
stages {
stage ('Checkout SCM')
{
Expand All @@ -21,15 +21,14 @@ pipeline {
script {
checkout scm
workspace = pwd ()
}
}
}
}
}
}
stage('Setting Environment Variables') {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
script {

echo "Getting git repo info"
// Get the current repository URL
REPO_URL = sh(script: 'git config --get remote.origin.url', returnStdout: true).trim()
Expand Down Expand Up @@ -84,12 +83,12 @@ pipeline {
// If dockerComposePath is provided, run docker-compose to build images
echo "Docker Compose file detected. Building images using docker-compose..."
sh """
docker compose -f ${workspace}/${dockerComposePath} build --parallel
docker compose -f ${workspace}${params.dockerComposePath} build --parallel
"""

// Get repository and tag of the images created by docker-compose
images = sh(script: """
docker compose -f ${workspace}/${dockerComposePath} images --format '{{.Repository}}:{{.Tag}}'
docker compose -f ${workspace}${params.dockerComposePath} images --format '{{.Repository}}:{{.Tag}}'
""", returnStdout: true).trim().split("\n")

} else if (dockerfilePath?.trim()) {
Expand All @@ -98,7 +97,7 @@ pipeline {

def imageName = "my_image:latest" // You can customize the image name as needed
sh """
docker build -t ${imageName} -f ${dockerfilePath} .
docker build -t ${imageName} -f ${params.dockerfilePath} .
"""

echo "Image built from Dockerfile: ${imageName}"
Expand All @@ -108,7 +107,7 @@ pipeline {
}

// Save images to an environment variable for later stages
IMAGES = images.join(",")
images_string = images.join(",")
}
}
}
Expand All @@ -118,8 +117,8 @@ pipeline {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
script {
def images = []
if (IMAGES && IMAGES.trim()) {
images = IMAGES.split(",")
if (${images_string} && ${images_string}.trim()) {
images = ${images_string}.split(",")
}
else {
error "No images to scan with Snyk"
Expand All @@ -143,13 +142,10 @@ pipeline {
}
stage('SQL map endpoints scan') {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
withFileParameter('endpoints') {
sh """
docker run --rm -v ${PWD}:/usr/src/myapp -w /usr/src/myapp thanosefsta/sqlmap:latest -m ${workspace}/jenkins/sqlmap/endpoints.txt --batch > sqlmap
"""

}
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh """
docker run --rm -v ${PWD}:/usr/src/myapp -w /usr/src/myapp thanosefsta/sqlmap:latest -m ${workspace}${params.endpointsPath} --batch > sqlmap
"""
}

}
Expand All @@ -160,7 +156,6 @@ pipeline {
script {
sh """
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/usr/src/myapp -w /usr/src/myapp nikolaskir2000/nmap_image_3:latest -p- 192.168.2.11

"""
}
}
Expand Down
2 changes: 1 addition & 1 deletion jenkins/sqlmap/endpoints.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
http://testphp.vulnweb.com/artists.php?artist=1%27
http://testphp.vulnweb.com/artists.php?artist=1