A source code analyzer built for surfacing features of interest and other characteristics to answer the question 'What's in the code?' quickly using static analysis with a json based rules engine. Ideal for scanning components before use or detecting feature level changes.
Перейти к файлу
Gabe Stocco d6dc1fc5a7 Formatting: Add Missing Braces Back 2023-03-02 11:45:11 -08:00
.github/ISSUE_TEMPLATE Create codeql3000.yml (#508) 2022-09-06 11:34:13 -07:00
AppInspector Formatting: Add Missing Braces Back 2023-03-02 11:45:11 -08:00
AppInspector.Benchmarks Formatting: Add Missing Braces Back 2023-03-02 11:45:11 -08:00
AppInspector.CLI Formatting: Add Missing Braces Back 2023-03-02 11:45:11 -08:00
AppInspector.Common Adds DependsOnTags field to Rule 2023-03-01 16:30:51 -08:00
AppInspector.Logging Use YamlPath Nuget + Update Dependencies (#519) 2022-12-14 11:13:24 -08:00
AppInspector.RulesEngine Formatting: Add Missing Braces Back 2023-03-02 11:45:11 -08:00
AppInspector.Tests Formatting: Add Missing Braces Back 2023-03-02 11:45:11 -08:00
AppInspector.Tests.CLI Use YamlPath Nuget + Update Dependencies (#519) 2022-12-14 11:13:24 -08:00
ApplicationInspector.wiki@e6d27482f8 Fix for #177 (#178) 2020-03-25 14:46:06 -07:00
Pipelines Publish .NET 7.0 Version (#516) 2022-11-16 07:44:23 -08:00
.editorconfig Formatting: Add Missing Braces Back 2023-03-02 11:45:11 -08:00
.gitattributes Initial ApplicationInspector check-in 2019-10-09 15:17:14 -07:00
.gitignore Rewrite logging, tests, add user customizable languages. (#441) 2022-04-29 11:50:23 -07:00
AppInspector.sln Use System.Text.Json instead of Newton.Json (#525) 2023-02-08 13:24:09 -08:00
BUILD.md Update BUILD.md 2022-09-01 17:27:09 -07:00
CODE_OF_CONDUCT.md Initial commit 2019-10-07 13:30:33 -07:00
CONTRIBUTING.md Initial ApplicationInspector check-in 2019-10-09 15:17:14 -07:00
Directory.Build.props Use YamlPath Nuget + Update Dependencies (#519) 2022-12-14 11:13:24 -08:00
JustRunIt.md Fixed wiki link in README.md (#415) 2022-01-10 12:50:19 -08:00
LICENSE.txt Initial ApplicationInspector check-in 2019-10-09 15:17:14 -07:00
NOTICE.txt Initial ApplicationInspector check-in 2019-10-09 15:17:14 -07:00
README.md Update README.md (#532) 2023-03-01 10:10:33 -08:00
SECURITY.md Initial ApplicationInspector check-in 2019-10-09 15:17:14 -07:00
SUPPORT.md Create SUPPORT.md (#225) 2020-06-01 10:25:17 -07:00
appinspector.log.txt Rewrite logging, tests, add user customizable languages. (#441) 2022-04-29 11:50:23 -07:00
codeql3000.yml Create codeql3000.yml (#508) 2022-09-06 11:34:13 -07:00
cst_logo.svg Add logo svg file 2020-04-22 16:22:56 -07:00
icon-128.png Release 1.3 (#375) 2021-05-25 07:33:23 -07:00
log.txt Rewrite logging, tests, add user customizable languages. (#441) 2022-04-29 11:50:23 -07:00
version.json Adds DependsOnTags field to Rule 2023-03-01 16:30:51 -08:00

README.md

Introduction

CodeQL Nuget Nuget

Microsoft Application Inspector is a software source code characterization tool that helps identify coding features of first or third party software components based on well-known library/API calls and is helpful in security and non-security use cases. It uses hundreds of rules and regex patterns to surface interesting characteristics of source code to aid in determining what the software is or what it does from what file operations it uses, encryption, shell operations, cloud API's, frameworks and more and has received industry attention as a new and valuable contribution to OSS on ZDNet, SecurityWeek , CSOOnline , Linux.com/news , HelpNetSecurity, Twitter and more and was first featured on Microsoft.com.

Application Inspector is different from traditional static analysis tools in that it doesn't attempt to identify "good" or "bad" patterns; it simply reports what it finds against a set of over 400 rule patterns for feature detection including features that impact security such as the use of cryptography and more. This can be extremely helpful in reducing the time needed to determine what Open Source or other components do by examining the source directly rather than trusting to limited documentation or recommendations.

The tool supports scanning various programming languages including C, C++, C#, Java, JavaScript, HTML, Python, Objective-C, Go, Ruby, PowerShell and more and can scan projects with mixed language files. It supports generating results in HTML, JSON and text output formats with the default being an HTML report similar to the one shown here.

appinspector-Features

Be sure to see our complete project wiki page https://Github.com/Microsoft/ApplicationInspector/wiki for additional information and help.

Quick Start

Obtain Application Inspector

  • Download and install the .NET 6 SDK
  • Run dotnet tool install --global Microsoft.CST.ApplicationInspector.CLI

See more in the wiki

Platform Dependent Binary

  • Download Application Inspector by selecting the pre-built package for the operating system of choice shown under the Assets section of the Releases.

Run Application Inspector

  • Nuget Tool: appinspector analyze -s path/to/src.
  • Platform Specific: applicationinspector.cli.exe analyze -s path/to/src

Goals

Microsoft Application Inspector helps you in securing your applications from start to deployment.

Design Choices - Enables you to choose which components meet your needs with a smaller footprint of unnecessary or unknowns features for keeping your application attack surface smaller as well as help to verify expected ones i.e. industry standard crypto only.

Identifying Feature Deltas - Detects changes between component versions which can be critical for detecting injection of backdoors.

Automating Security Compliance Checks - Use to identify components with features that require additional security scrutiny, approval or SDL compliance as part of your build pipeline or create a repository of metadata regarding all of your enterprise application.

Contribute

We have a strong default starting base of Rules for feature detection. But there are many feature identification patterns yet to be defined and we invite you to submit ideas on what you want to see or take a crack at defining a few. This is a chance to literally impact the open source ecosystem helping provide a tool that everyone can use. See the Rules section of the wiki for more.

Official Releases

Application Inspector is in GENERAL AUDIENCE release status. Your feedback is important to us. If you're interested in contributing, please review the CONTRIBUTING.md.

Application Inspector is availble as a command line tool or NuGet package and is supported on Windows, Linux, or MacOS.

Platform specific binaries of the ApplicationInspector CLI are available on our GitHub releases page.

The C# library is available on NuGet as Microsoft.CST.ApplicationInspector.Commands .

The .NET Global Tool is available on NuGet as Microsoft.CST.ApplicationInspector.CLI.

If you use the .NET Core version, you will need to have .NET Core 6.0 or later installed. See the JustRunIt.md or Build.md files for more.

CLI Usage Information

> appinspector --help
ApplicationInspector.CLI 1.4.0+6bdef0356b
c Microsoft Corporation. All rights reserved.

  analyze        Inspect source directory/file/compressed file (.tgz|zip) against defined characteristics

  tagdiff        Compares unique tag values between two source paths

  exporttags     Export unique rule tags to view what code features may be detected

  verifyrules    Verify custom rules syntax is valid

  packrules      Combine multiple rule files into one file for ease in distribution

  help           Display more information on a specific command.

  version        Display version information.

Examples:

Command Help

To get help for a specific command run appinspector <command> --help.

Analyze Command

The Analyze Command is the workhorse of Application Inspector.

Simple Default Analyze

This will produce an output.html of the analysis in the current directory using default arguments and rules.

appinspector analyze -s path/to/files

Output Sarif

appinspector analyze -s path/to/files -f sarif -o output.sarif

Excluding Files using Globs

This will create a json output named data.json of the analysis in the current directory, excluding all files in test and .git folders using the provided glob patterns.

appinspector analyze -s path/to/files -o data.json -f json -g **/tests/**,**/.git/**

Additional Usage Information

For additional help on use of the console interface see CLI Usage.

For help using the NuGet package see NuGet Support

Build Instructions

See build.md