Skip to content

andythehood/apigeelint-misconfigurationChecks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

apigeelint external plugins for Misconfiguration Checks

Apache 2.0 LastCommit CommitActivity

Apigeelint is a Static code analysis tool for Apigee Proxy and SharedFlow bundles to encourage API developers to use best practices and avoid anti-patterns.

This repo contains a set of External Plugins for apigeelint that can help identify potential API misconfigurations by checking whether proxies contain required policies.

Rules

The following rules are currently available:

Code Name Description
EX-BN001 MisconfigurationCheckAuth Check for the presence of OAuthV2 and/or VerifyAPIKey policies in each Proxy Endpoint's PreFlow
EX-BN002 MisconfigurationCheckCORS Check for the presence of a CORS policy in each Proxy Endpoint's PreFlow
EX-BN003 MisconfigurationCheckThreat Check for the presence of JSONThreatProtection and/or XMLThreatProtection policies in each Proxy Endpoint's PreFlow
EX-BN004 MisconfigurationCheckMediation Check for the presence of OASValidation and/or MessageValidation policies in each Proxy Endpoint's PreFlow
EX-PF001 RequirePoliciesPreFlowRequest Check for the presence of a set of specific named policies in each Proxy Endpoint's PreFlow. This can be used to enforce a naming convention for policies in addition to requiring the policy type
EX-PF002 RequireSharedFlowPreFlowRequest Check for the usage of specific Shared Flow Bundles called from FlowCallout policies in each Proxy Endpoint's PreFlow

Requirements

These plugins require apigeelint to be installed. This can be installed using the command:

npm install --location=global apigeelint

See https://www.npmjs.com/package/apigeelint for additional details.

Usage

Standalone

To use, clone or download this repository and run apigeelint with the -x or --externalPluginsDirectory option to specify the relative or full path to the externalPlugins directory from this repo, e.g.

apigeelint -x ./externalPlugins -s path/to/your/apiproxy -f table.js

VS Code

If you are using VScode, then you can also use these plugins with the Apigeelint 4 VS Code extension by selecting the following extension setting:

  • apigeelint.externalPluginsDirectory: Full path to an external plugins directory (default: none)

Known Issues

None yet!

Limitations

The BN001-BN004 plugins check for presence of the policies in the PreFlow, but do not check whether they are potentially excluded via a <Condition/> clause

The BN001-BN004 plugins don't take into account policies included in Shared Flow Bundles.

The PF002 plugin does not check for Shared Flow Bundles automatically attached through the use of Flow Hooks

Support

If you find issues, file a ticket here on Github. Keep in mind that there is no service level agreement (SLA) for responses to these issues. Assume all responses are on an ad-hoc, volunteer basis.

If you simply have questions, we recommend asking on the Apigee forum on GoogleCloudCommunity. Apigee experts regularly check that forum.

Apigee customers should use formal support channels for Apigee product related concerns.

License and Copyright

This material is Copyright (c) 2023 Google LLC. and is licensed under the Apache 2.0 License.

Disclaimer

These plugins do not form part of Apigee or any other officially supported Google Product.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published