Граф коммитов

46 Коммитов

Автор SHA1 Сообщение Дата
cobya 7528c8f4fd Revert non-PR .NET 8 commits 2024-09-16 09:27:20 -07:00
cobya bb9945e5ac Resolve formatting errors, fix tests 2024-09-16 09:20:15 -07:00
Paul Dorsch 1d1e13bfa7
update packages to fix pack (#1234) 2024-08-23 15:27:44 -04:00
stan-sz 2dcd512bfa
Use MSTest meta package (#1215)
* Use MSTest meta package

This enables running MSTest Analyzers on test code to help avoid common test problems.

* Fix code coverage

* Fixes

Upgrade to latest and fix unnecessary type param

* Fix tests

* PR feedback

* Fix CC
2024-08-22 08:03:39 -04:00
Paul Dorsch edf0c8dc6e
Fix bug where pipreport used index-urls from requirements.txt (#1227)
* fix bug where pipreport used index urls in requirements.txt

* update tests

* docs

* add --no-input to pip install, so we do not hang waiting for user input

* pr feedback: performance and cleanup

* bump version
2024-08-19 14:28:52 +00:00
Greg Villicana 341b036de7
Sanitize Docker environment vars in logs (#1163) 2024-06-06 17:50:14 -07:00
Greg Villicana 07a2e84f94
Simple sanitization in strings used in CLI before logging (#1155) 2024-06-05 18:10:19 -07:00
Coby Allred 9f1e5a9083
Update NormalizePath to be more robust (#1152) 2024-06-04 22:10:30 +00:00
Coby Allred e9a146ca76
Add Pip installation report experimental detector (#1129)
* Add PipReport experimental detector

* Don't use primary constructor

* Fix CI break

* Address PR comments

* Update src/Microsoft.ComponentDetection.Detectors/pip/PipReportUtilities.cs

Co-authored-by: Jamie Magee <jamagee@microsoft.com>

* Update src/Microsoft.ComponentDetection.Detectors/pip/PipReportComponentDetector.cs

Co-authored-by: Jamie Magee <jamagee@microsoft.com>

* Log cmd failure

---------

Co-authored-by: Coby Allred <coallred@microsoft.com>
Co-authored-by: Jamie Magee <jamagee@microsoft.com>
2024-05-22 18:43:13 -07:00
James Oakley f85b6c4363
Support development dependencies for the Gradle detector (#878)
* Support development dependencies for the Gradle detector

Lack of development dependency detection for Gradle is a problem for
Android teams, especially in the context of Component Governance
alerts. Unfortunately Gradle doesn't provide enough information to
definitively identify dev dependencies in all cases, so manual
configuration is required. This change adds dev dependency
classification through two mechanisms

1. `buildscript-gradle.lockfile` and `settings-gradle.lockfile`
   contain only build-system dependencies, so always classify these as
   development dependencies.
2. Processing based on two new environment variables:
   `GRADLE_PROD_CONFIGURATIONS_REGEX` and
   `GRADLE_DEV_CONFIGURATIONS_REGEX`. Gradle lockfiles indicate which
   Gradle configuration(s) each dependency is required by.
   `GRADLE_PROD_CONFIGURATIONS_REGEX` allows specifying
   production configurations explicitly. All other configurations are
   considered development. Alternately, dev configurations may be
   specified in `GRADLE_DEV_CONFIGURATIONS_REGEX` and all others are
   considered production.

* Changes based on meeting prior to the holidays

* fluent assertions

* Visual studio recommendations

* More fluent assertsions

* Fix test to be cross-platform

* Fix the cross-platform test fix

* Fix code coverage by removing dead code check

* Address code review comments
2024-02-27 10:39:53 -08:00
Justin Perez e10db57d9c
refactor: remove `BroadcastChannel` (#793) 2023-09-19 11:14:00 -07:00
Justin Perez cf7ef1b8ce
feat: add broadcast channel (#774) 2023-09-11 08:47:45 -07:00
renovate[bot] 3e241c77f8
chore(deps): update dependency fluentassertions.analyzers to v0.24.0 (#761)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Justin Perez <justinperez@microsoft.com>
2023-09-01 10:36:20 -07:00
Justin Perez aff38db11d
tests(common): add more tests (#756) 2023-08-31 10:52:34 -07:00
Justin Perez e4c43e33da
ci: add Codecov (#754) 2023-08-29 15:21:39 -07:00
Justin Perez eb783bd574
refactor: use `FluentAssertions.Analyzers` for Common tests (#694) 2023-08-03 19:21:15 +01:00
renovate[bot] 5cdaf5d8a5
chore(deps): update dependency stylecop.analyzers to v1.2.0-beta.507 (#613)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jamie Magee <jamagee@microsoft.com>
2023-06-21 12:51:48 -07:00
Jamie Magee cb6204f542
feat: use `Newtonsoft.Json` streaming methods (#596) 2023-06-06 13:28:34 -07:00
Justin Perez 4c53d00338
feat(npm): add support for lockfile v3 (#490) 2023-04-07 12:13:44 -07:00
Justin Perez b42401966e
refactor: simplify `PathUtilityService` (#458) 2023-03-07 13:42:44 -08:00
Justin Perez 273d48eb61
feat: Switch to Serilog (#441) 2023-02-23 12:28:08 -08:00
Justin Perez 9df530aa70
perf: add buffering to `FileWritingService` (#435) 2023-02-17 09:04:43 -08:00
Jamie Magee f6912c0258
refactor: migrate away from MEF to Dependency Injection (#412) 2023-02-14 09:33:07 -08:00
Justin Perez 4e49e43c89
Fix some analyzer warnings (#416) 2023-01-31 08:43:20 -08:00
Jamie Magee 0f3fa8a844
refactor: use file scoped namespaces (#398) 2023-01-05 09:10:56 -08:00
Coby Allred 5bc355e98e
Add explicit reference to System.Threading.Tasks.Dataflow (#360)
* Add explicit reference to System.Threading.Tasks.Dataflow

Add explicit reference to System.Threading.Tasks.Dataflow to avoid version resolution conflicts.

* Force resolve System.Threading.Tasks.Dataflow
2022-11-09 09:40:43 -08:00
Daniel Akili 2e911a558e
fix: analyzer warnings IDE0019, IDE0021, IDE0037 (#326) 2022-10-27 17:04:50 -07:00
Rushabh 62133a4f36
refactor: fix analyzer warnings (#319)
* fix IDE0120: Simplify LINQ expression

* fixed IDE0037: Member name can be simplified

* fix: IDE0071: Interpolation can be simplified

* fixed IDE0052: Private member can be removed as the value assigned to it is never read

* fixed IDE0032: Use auto property

* IDE0054: Use compound assignment

* fixed SA1203: connstant fields should not be after the non-constant

* fixed IDE0037 by reformatting

* fixed SA1316: Tuple element names should use correct casing

* fixed SA1216:  Using static directives should be placed at the correct location

* fixed SA1401: field should be private
2022-10-25 09:12:07 -07:00
Jamie Magee 37d48290e8
test: exclude `Microsoft.NET.Test.Sdk` from `Microsoft.ComponentDetection.TestsUtilities` project (#321) 2022-10-21 09:52:16 -07:00
amitla1 7d5668e816
Refactor: Fix SA1202 (#252)
* Fis SA1202

* removed whitespac

* reverted this file

* reverted this file

* Reverted this file

* Fixing indentation

* Removed whitespace

* Removed whitespace

* changed location of static variable

* took out the SA1202 suggestion

* changed private method to come after public methods

* Added supression message for access level order

Co-authored-by: Amitla Vannikumar <avannikumar@microsoft.com>
2022-09-06 12:59:11 -07:00
Adam Plaskitt 799c30a3ae
Refactor: Fix warning SA1108 (#237)
* Related to #202

Block statements should not contain embedded comments
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1108.md

* Remove trailing whitespace warning

Co-authored-by: amitla1 <46578839+amitla1@users.noreply.github.com>
2022-09-01 13:15:39 -07:00
Jamie Magee 644512a17f
refactor: fix SA1208 (#218) 2022-08-24 11:42:33 -07:00
amitla1 8e8c3a4557
Refactor: Fix SA1117 (#214)
Co-authored-by: Amitla Vannikumar <avannikumar@microsoft.com>
2022-08-19 16:56:29 -07:00
Jamie Magee bf900cef6e
refactor: use `var` in place of explicit types (#185) 2022-08-16 16:06:13 +00:00
Jamie Magee a6205c0a19
refactor: prefix local calls with `this` (#186) 2022-08-04 20:24:13 +00:00
Jamie Magee 3220892e99
refactor: remove trailing whitespace (#188) 2022-08-04 11:58:40 -07:00
Jamie Magee 26f8c14cde
refactor: remove unused usings (#187) 2022-08-04 11:55:11 -07:00
Jamie Magee cc187a8c15
test: simplify test project `.csproj` (#169) 2022-07-11 10:09:39 -07:00
renovate[bot] 29d02b805b
chore(deps): update dependency fluentassertions to v6.7.0 (#148)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2022-06-29 17:09:54 -07:00
Rushabh 0bab2eea89
Enable GoCliDetector by default. Using env variable 'DisableGoCliDetector=true" to manually disable GoCliDetector. (#113)
Previously, the Go-Detector by default scanned the manifest and generated components. We were using EnableGoCliScan env. variable to activate the Go Cli Detector. With this change, the use of EnableGoCliScan is removed. The Go detector by default uses Cli scan.

To manually override this behavior, new env. variable DisableGoCliScan is introduced.
2022-05-09 11:09:56 -07:00
Rushabh 3a17feb7e1
Added dependencyScope detection for maven components (#87)
* Added "DependencyScope" for scanned component. Currently detection is only active for maven components.
* Added telemetry to keep track of each recorded component.
2022-04-06 11:24:13 -07:00
Jamie Magee a3654b5aec
refactor(linux): use a smaller image to test base image annotations (#90)
* refactor(linux): use a smaller image to test base image annotations

Currently we're using an Ubuntu image, which is >100MB for unit tests. This is a large image for build machines and users to pull in for a single unit test, especially when we're only checking annotations.

This PR instead uses the `docker.io/library/hello-world:latest` image, which weighs in at a whopping 13KB.

* UTC time
2022-04-04 14:34:40 -07:00
Coby Allred ee44b89aa2
Migrate IPyPiClient cache to LRU MemoryCache (#80)
* Migrate IPyPiClient cache to LRU MemoryCache
* Update test formatting
* Update Caching.Memory to 3.1.23
* Address PR comments
* StyleCop
2022-03-24 15:35:29 -07:00
Christopher Boumenot be81563039
Support case-insensitive on non-Windows OSs. (#75)
* Support case-insensitive on non-Windows OSs.

The environment variable EnableGoCliScan existence gates usage of the Go
CLI tools for determing what modules are in-use.  The current check does
a get of the environment variable, and if it exists behavior is enabled.
On Windows this is case-insensitive, but on Linux (or MacOS) this is
case-sensitive so the user must exactly use the casing of
'EnableGoCliScan'.

Our CI system automatically capitalizes all environment variables when
they are defined, so EnableGoCliScan becomes ENABLEGOCLISCAN.  I am not
aware of a way to control this behavior, so there is no way to enable Go
CLI tooling.  My fix is to treat all environment variable exitence
checks as case-insensitive.

* New components can be detected with Env Variable change

Co-authored-by: Greg Villicana <gregory.villicana@microsoft.com>
2022-03-11 03:17:00 +00:00
Jamie Magee 8e6f9d5f2d
refactor: use collection’s count property (#62) 2022-02-02 14:49:02 -08:00
Teodor Voinea b7bac63e95 Initial commit 2021-11-19 06:07:50 -08:00