-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into PMM-9870-fix-collstats-indexsizes-metrics
- Loading branch information
Showing
10 changed files
with
147 additions
and
21 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
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,48 @@ | ||
name: Scorecard | ||
on: | ||
# To guarantee Maintained check is occasionally updated. See | ||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained | ||
schedule: | ||
- cron: "24 3 * * 1" | ||
push: | ||
branches: | ||
- main | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Needed to upload the results to code-scanning dashboard. | ||
security-events: write | ||
# Needed to publish results and get a badge (see publish_results below). | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Run analysis | ||
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
publish_results: true | ||
|
||
- name: Upload results | ||
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
# Upload the results to GitHub's code scanning dashboard (optional). | ||
- name: "Upload to code-scanning" | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: results.sarif |
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
.dist | ||
.env | ||
|
||
.vscode/ | ||
.idea | ||
|
||
bin | ||
build | ||
dist | ||
|
||
cover.out | ||
mongodb_exporter | ||
.DS_Store |
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
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
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
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 |
---|---|---|
|
@@ -100,6 +100,7 @@ function general_servers() { | |
EOF | ||
} | ||
|
||
|
||
case $1 in | ||
cnf_servers) | ||
cnf_servers | ||
|
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
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
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 |
---|---|---|
|
@@ -227,6 +227,48 @@ func TestBuildURI(t *testing.T) { | |
newPassword: "yyy?!#$%^&*()_+", | ||
expect: "mongodb://xxx%3F%21%23$%25%5E&%2A%28%29_+:yyy%3F%21%23$%25%5E&%2A%28%[email protected]", | ||
}, | ||
{ | ||
situation: "path to socket", | ||
origin: "mongodb:///tmp/mongodb-27017.sock", | ||
newUser: "", | ||
newPassword: "", | ||
expect: "mongodb:///tmp/mongodb-27017.sock", | ||
}, | ||
{ | ||
situation: "path to socket with params", | ||
origin: "mongodb://username:s3cur3%20p%40$$w0r4.@%2Fvar%2Frun%2Fmongodb%2Fmongodb.sock/database?connectTimeoutMS=1000&directConnection=true&serverSelectionTimeoutMS=1000", | ||
newUser: "", | ||
newPassword: "", | ||
expect: "mongodb://username:s3cur3%20p%40$$w0r4.@%2Fvar%2Frun%2Fmongodb%2Fmongodb.sock/database?connectTimeoutMS=1000&directConnection=true&serverSelectionTimeoutMS=1000", | ||
}, | ||
{ | ||
situation: "path to socket with auth", | ||
origin: "mongodb://xxx:yyy@/tmp/mongodb-27017.sock", | ||
newUser: "", | ||
newPassword: "", | ||
expect: "mongodb://xxx:yyy@/tmp/mongodb-27017.sock", | ||
}, | ||
{ | ||
situation: "path to socket with auth and user params", | ||
origin: "mongodb:///tmp/mongodb-27017.sock", | ||
newUser: "xxx", | ||
newPassword: "yyy", | ||
expect: "mongodb://xxx:yyy@/tmp/mongodb-27017.sock", | ||
}, | ||
{ | ||
situation: "path to socket without prefix", | ||
origin: "/tmp/mongodb-27017.sock", | ||
newUser: "", | ||
newPassword: "", | ||
expect: "mongodb:///tmp/mongodb-27017.sock", | ||
}, | ||
{ | ||
situation: "path to socket without prefix with auth", | ||
origin: "/tmp/mongodb-27017.sock", | ||
newUser: "xxx", | ||
newPassword: "yyy", | ||
expect: "mongodb://xxx:yyy@/tmp/mongodb-27017.sock", | ||
}, | ||
} | ||
for _, tc := range tests { | ||
t.Run(tc.situation, func(t *testing.T) { | ||
|