Skip to content

Commit 8fc3235

Browse files
authored
docs: minor grammar fixes (#1743)
These were flagged by my IDE, so I figured I'd get them addressed
1 parent ff413cd commit 8fc3235

24 files changed

+30
-30
lines changed

cmd/osv-scanner/fix/state-choose-strategy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (st *stateChooseStrategy) Update(m model, msg tea.Msg) (tea.Model, tea.Cmd)
117117
if st.cursorPos == stateChooseQuit {
118118
return m, tea.Quit
119119
}
120-
// otherwise move the cursor to the quit line if its not already there
120+
// otherwise move the cursor to the quit line if it's not already there
121121
st.cursorPos = stateChooseQuit
122122
case key.Matches(msg, tui.Keys.Select):
123123
// enter key was pressed, parse input

cmd/osv-scanner/fix/state-in-place-result.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (st *stateInPlaceResult) Update(m model, msg tea.Msg) (tea.Model, tea.Cmd)
110110
if st.cursorPos == stateInPlaceQuit {
111111
return m, tea.Quit
112112
}
113-
// move the cursor to the quit line if its not already there
113+
// move the cursor to the quit line if it's not already there
114114
st.cursorPos = stateInPlaceQuit
115115
case key.Matches(msg, tui.Keys.Select):
116116
// enter key was pressed, parse input

cmd/osv-scanner/fix/state-relock-result.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (st *stateRelockResult) Update(m model, msg tea.Msg) (tea.Model, tea.Cmd) {
177177
if st.getEffectiveCursor() == stateRelockQuit {
178178
return m, tea.Quit
179179
}
180-
// move the cursor to the quit line if its not already there
180+
// move the cursor to the quit line if it's not already there
181181
st.setEffectiveCursor(stateRelockQuit)
182182
case key.Matches(msg, tui.Keys.Select): // enter key pressed
183183
return st.parseInput(m)

docs/github-action.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OSV-Scanner is available as a CI/CD Action. We currently offer two different reu
2323
1. A workflow that triggers a scan with each [pull request](./github-action.md#scan-on-pull-request) and will only report new vulnerabilities introduced through the pull request.
2424
2. A workflow that performs a full vulnerability scan, which can be configured to scan on pushes or a [regular schedule](./github-action.md#scheduled-scans). The full vulnerability scan can also be configured to run [on release](./github-action.md#scan-on-release) to prevent releasing with known vulnerabilities in dependencies.
2525

26-
Currently there is no prebuilt workflows for other platforms, but we welcome any contributions for this!
26+
Currently, there is no prebuilt workflows for other platforms, but we welcome any contributions for this!
2727

2828
## Scan on pull request
2929

@@ -113,7 +113,7 @@ Maintainers can review results of the scan by navigating to their project's `sec
113113

114114
## Scan on release
115115

116-
Here is a example of blocking on release, though the actual implementation will heavily depend on your specific release process.
116+
Here is an example of blocking on release, though the actual implementation will heavily depend on your specific release process.
117117

118118
```yml
119119
name: Go Release Process

docs/guided-remediation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This tool provides several options to users for how to prioritise and remediate
2828

2929
- Resolution and analysis of the entire transitive graph (leveraging [deps.dev](https://deps.dev)) to determine the minimal changes required to remove vulnerabilities.
3030
- Prioritising direct dependency upgrades by the total number of transitive vulnerabilities fixed.
31-
- Prioritising vulnerabilities by dependency depth, severity, and whether or not to care about dev-only dependencies.
31+
- Prioritising vulnerabilities by dependency depth, severity, and whether to care about dev-only dependencies.
3232
- Modification of package manifest and lockfiles (e.g. `package.json`/`package-lock.json`) to fix vulnerabilities.
3333
- Different strategies with different risk/reward ratios (e.g. in-place fixes vs relocking).
3434

@@ -674,7 +674,7 @@ Relocking recomputes your entire dependency graph based on your manifest file, t
674674

675675
Selecting the "Relock" option will bring you to the relock information page. Here, you can see which vulnerabilities are present after relocking.
676676

677-
In addition to relocking, it may be possible to further remove vulnerabilities by bumping the required version constraints of your direct dependencies. You may choose to apply these patches by selecting them on the relock page then choosing the "Apply pending patches" option. The dependency graph will then be recomputed and you may continue to select more options.
677+
In addition to relocking, it may be possible to further remove vulnerabilities by bumping the required version constraints of your direct dependencies. You may choose to apply these patches by selecting them on the relock page then choosing the "Apply pending patches" option. The dependency graph will then be recomputed, and you may continue to select more options.
678678

679679
![Screenshot of the interactive relock results screen with some relaxation patches selected](images/guided-remediation-relock-patches.png)
680680

@@ -800,7 +800,7 @@ For more information, see [Offline Mode](./offline-mode.md).
800800
Remediation in npm `workspaces` is only partially supported:
801801

802802
- In-place updates should function correctly on the workspace `package-lock.json`.
803-
- Dependency relaxation can change dependencies in the `package.json` file being being scanned. This means only dependencies declared in the root package can be changed.
803+
- Dependency relaxation can change dependencies in the `package.json` file being scanned. This means only dependencies declared in the root package can be changed.
804804
- You can remediate the individual `package.json` files of each workspace, but this will be unaware of any packages or constraints caused by sibling workspaces.
805805
- The `node_modules/` in workspaces are not deleted when relocking, which may impact the resulting dependency graph when running `npm install`.
806806
- Each workspace package is considered dependency depth 1 from the root workspace.

docs/migration-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Most experimental commands have now been stablized, all experimental versions of
1919

2020
---
2121

22-
Container scanning and the `--docker/-D` flag has been migrated to it's own command.
22+
Container scanning and the `--docker/-D` flag has been migrated to its own command.
2323

2424
```bash
2525
osv-scanner scan image <image-name>

docs/output.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ This feature is in beta as part of OSV-Scanner v2, please [share your feedback h
127127

128128
### JSON
129129

130-
JSON output allows you to get all of the information osv-scanner found in a machine readable format.
130+
JSON output allows you to get all the information osv-scanner found in a machine-readable format.
131131

132132
```bash
133133
osv-scanner scan --format json your/project/dir

docs/supported_languages_and_lockfiles.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ nav_order: 2
1818
{:toc}
1919
</details>
2020

21-
Artifact and manifest extraction logic is implemented in [OSV-Scalibr](https://github.com/google/osv-scalibr) as a standalone library. OSV-Scanner tightly integrates with OSV-Scalibr to provide a end to end vulnerability scanner for developers.
21+
Artifact and manifest extraction logic is implemented in [OSV-Scalibr](https://github.com/google/osv-scalibr) as a standalone library. OSV-Scanner tightly integrates with OSV-Scalibr to provide an end to end vulnerability scanner for developers.
2222

2323
## Core Concept
2424

@@ -84,7 +84,7 @@ Vendored dependencies have been directly copied into the project folder, but do
8484

8585
OSV-Scanner supports transitive dependency scanning for Maven pom.xml. This feature is enabled by default when scanning, but it can be disabled using the `--no-resolve` flag. It is also disabled in the [offline mode](./offline-mode.md).
8686

87-
OSV-Scanner uses [deps.dev’s resolver library](https://pkg.go.dev/deps.dev/util/resolve) to compute the dependency graph of a project. This graph includes all of the direct and transitive dependencies. By default, [deps.dev API](https://docs.deps.dev/api/v3/index.html) is queried for package versions and requirements. The support for private registries is [coming soon](https://github.com/google/osv-scanner/issues/1045).
87+
OSV-Scanner uses [deps.dev’s resolver library](https://pkg.go.dev/deps.dev/util/resolve) to compute the dependency graph of a project. This graph includes all the direct and transitive dependencies. By default, [deps.dev API](https://docs.deps.dev/api/v3/index.html) is queried for package versions and requirements. The support for private registries is [coming soon](https://github.com/google/osv-scanner/issues/1045).
8888

8989
After the dependency resolution, the OSV database is queried for the vulnerabilities associated with these dependencies as usual.
9090

docs/usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ osv-scanner scan -L package-lock.json --format json
7272

7373
### Override config file
7474

75-
The `--config` flag can be used to specify a global config override to apply to all of the files you are scanning.
75+
The `--config` flag can be used to specify a global config override to apply to all the files you are scanning.
7676

7777
See [Config](./configuration.md) for more details.
7878

internal/ci/vulnerability_result_diff.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func DiffVulnerabilityResultsByOccurrences(oldRes, newRes models.VulnerabilityRe
120120
}
121121

122122
for k, oldVulnCount := range oldResMap {
123-
// If the new result has less vulnerabilities than the old result remove the entry from the new result.
123+
// If the new result has fewer vulnerabilities than the old result remove the entry from the new result.
124124
// `map`'s default value is 0 when empty, and delete also works fine when the entry is empty
125125
if newResMap[k] <= oldVulnCount {
126126
delete(newResMap, k)

internal/clients/clientimpl/osvmatcher/cachedosvmatcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (matcher *CachedOSVMatcher) doQueries(ctx context.Context, invs []*extracto
102102

103103
if err != nil {
104104
// Deadline being exceeded is likely caused by a long paging time
105-
// if that's the case, we can should return what we already got, and
105+
// if that's the case, we should return what we already got, and
106106
// then let the caller know it is not all the results.
107107
if errors.Is(err, context.DeadlineExceeded) {
108108
deadlineExceeded = true

internal/clients/clientimpl/osvmatcher/osvmatcher.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const (
1717
maxConcurrentRequests = 1000
1818
)
1919

20-
// OSVMatcher implements the VulnerabilityMatcher interface with a osv.dev client.
20+
// OSVMatcher implements the VulnerabilityMatcher interface with an osv.dev client.
2121
// It sends out requests for every package version and does not perform caching.
2222
type OSVMatcher struct {
2323
Client osvdev.OSVClient
@@ -47,7 +47,7 @@ func (matcher *OSVMatcher) MatchVulnerabilities(ctx context.Context, pkgs []*ext
4747

4848
if err != nil {
4949
// Deadline being exceeded is likely caused by a long paging time
50-
// if that's the case, we can should return what we already got, and
50+
// if that's the case, we should return what we already got, and
5151
// then let the caller know it is not all the results.
5252
if errors.Is(err, context.DeadlineExceeded) {
5353
deadlineExceeded = true
@@ -141,7 +141,7 @@ func queryForBatchWithPaging(ctx context.Context, c *osvdev.OSVClient, queries [
141141
if nextPageResp != nil {
142142
for i, res := range nextPageResp.Results {
143143
batchResp.Results[nextPageIndexMap[i]].Vulns = append(batchResp.Results[nextPageIndexMap[i]].Vulns, res.Vulns...)
144-
// Set next page token so caller knows whether this is all of the results
144+
// Set next page token so caller knows whether this is all the results
145145
// even if it is being cancelled.
146146
batchResp.Results[nextPageIndexMap[i]].NextPageToken = res.NextPageToken
147147
}

internal/customgitignore/dir_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ func TestRecursivelyParsingGitignoreFilesFromMidTreeFile(t *testing.T) {
364364
func TestNonRecursivelyParsingGitignoreFilesFromMidTreeFile(t *testing.T) {
365365
t.Parallel()
366366

367-
// expect this to be have the same results as TestNonRecursivelyParsingGitignoreFilesFromMidTree
367+
// expect this to have the same results as TestNonRecursivelyParsingGitignoreFilesFromMidTree
368368
// because the a_file is inside the that tests start-dir
369369

370370
// Create a specific git repo with .gitignore files

internal/customgitignore/walk_up_to_root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
//
3333
// The actual parsing is intended to be similar to how tools
3434
// like rg work, but means that `path` may not necessarily be
35-
// the root of a git repo, and can produces these parsing
35+
// the root of a git repo, and can produce these parsing
3636
// behaviours:
3737
//
3838
// `path` is a plain dir:

internal/datasource/http_auth.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type HTTPAuthentication struct {
4747
}
4848

4949
// Get makes an http GET request with the given http.Client.
50-
// The Authorization Header will automatically be populated according from the fields in the HTTPAuthentication.
50+
// The Authorization Header will automatically be populated according to the fields in the HTTPAuthentication.
5151
func (auth *HTTPAuthentication) Get(ctx context.Context, httpClient *http.Client, url string) (*http.Response, error) {
5252
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
5353
if err != nil {

internal/output/sarif.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func PrintSARIFReport(vulnResult *models.VulnerabilityResults, outputWriter io.W
252252
helpText := createSARIFHelpText(gv)
253253

254254
// Pick the "best" description from the alias group based on the source.
255-
// Set short description to the first entry with a non empty summary
255+
// Set short description to the first entry with a non-empty summary
256256
// Set long description to the same entry as short description
257257
// or use a random long description.
258258
var shortDescription, longDescription string

internal/output/sbom/cyclonedx_common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func addVulnerabilities(vulnerabilities map[string]cyclonedx.Vulnerability, pack
6868
continue
6969
}
7070

71-
// It doesn't exists yet, lets add it
71+
// It doesn't exist yet, lets add it
7272
vulnerabilities[vulnerability.ID] = cyclonedx.Vulnerability{
7373
ID: vulnerability.ID,
7474
Updated: formatDateIfExists(vulnerability.Modified),

internal/resolution/dependency_subgraph.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (ds *DependencySubgraph) IsDevOnly(groups map[manifest.RequirementKey][]str
118118
if e.Type.HasAttr(dep.Dev) {
119119
continue
120120
}
121-
// As a workaround for npm workspaces, check for the a Dev attr in the direct dependency's dependencies.
121+
// As a workaround for npm workspaces, check for the Dev attr in the direct dependency's dependencies.
122122
for _, e2 := range ds.Nodes[e.To].Children {
123123
if !e2.Type.HasAttr(dep.Dev) {
124124
return false

internal/resolution/resolve.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func resolvePostProcess(ctx context.Context, cl client.ResolutionClient, m manif
181181
vk := rv.VersionKey
182182
vk.VersionType = resolve.Concrete
183183
if _, err := cl.Version(ctx, vk); err != nil {
184-
// Not a soft requirement - try find a match.
184+
// Not a soft requirement - try to find a match.
185185
vk.VersionType = resolve.Requirement
186186
vks, err := cl.MatchingVersions(ctx, vk)
187187
if err != nil || len(vks) == 0 {

internal/sourceanalysis/rust.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func rustBuildSource(source models.SourceInfo) ([]string, error) {
252252
for _, de := range entries {
253253
// We only want .d files, which is generated for each output binary from cargo
254254
// These files contains a string to the full path of output binary/library file.
255-
// This is a reasonably reliable way to identify the output in a cross platform way.
255+
// This is a reasonably reliable way to identify the output in a cross-platform way.
256256
if de.IsDir() || !strings.HasSuffix(de.Name(), ".d") {
257257
continue
258258
}

internal/testutility/mock_http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (m *MockHTTPServer) SetResponseFromFile(t *testing.T, path string, filename
5151

5252
// SetAuthorization sets the contents of the 'Authorization' header the server expects for all endpoints.
5353
//
54-
// The incoming requests' headers must match the auth string exactly, otherwise the server will response with 401 Unauthorized.
54+
// The incoming requests' headers must match the auth string exactly, otherwise the server will respond with 401 Unauthorized.
5555
// If authorization is unset or empty, the server will not require authorization.
5656
func (m *MockHTTPServer) SetAuthorization(t *testing.T, auth string) {
5757
t.Helper()

internal/utility/purl/package_grouper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func Group(packageSources []models.PackageSource) (map[string]models.PackageVuln
2929

3030
uniquePackages[packageURL.ToString()] = packageVulns
3131
} else {
32-
// Entry does not exists yet, lets create it
32+
// Entry does not exist yet, lets create it
3333
newPackageVuln := models.PackageVulns{
3434
Package: models.PackageInfo{
3535
Name: pkg.Package.Name,

internal/utility/semverlike/version-semver-like.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/google/osv-scanner/v2/internal/cachedregexp"
1010
)
1111

12-
// Components is individual components of each semver segment.
12+
// Components are individual components of each semver segment.
1313
type Components []*big.Int
1414

1515
func (components *Components) Fetch(n int) *big.Int {

scripts/generate_mock_resolution_universe/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func makeUniverse(cl *client.DepsDevClient) (clienttest.ResolutionUniverse, erro
250250
}
251251

252252
// Get all vulns for all versions of all packages.
253-
// It's easier to re-query this than to try use the vulnerability client's cache.
253+
// It's easier to re-query this than to try to use the vulnerability client's cache.
254254
batchQueries := make([]*osvdev.Query, len(pks))
255255
for i, pk := range pks {
256256
batchQueries[i] = &osvdev.Query{

0 commit comments

Comments
 (0)