Skip to content

[BUG] Cannot analyze package file with aws-amplify or aws-amplify-react #265

@danielahedges

Description

@danielahedges

Bug Description

I have a JavaScript project that has packages aws-amplify and aws-amplify-react, and if either of these dependencies are in the package, auditjs fails with:

There was an error auditing with Sonatype OSS Index Error: There was an error making the request: Error: Internal Server Error
    at /Users/dhedges/src/ossi/node_modules/auditjs/bin/Services/OssIndexRequestService.js:71:19
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 5)

To Reproduce

Create the following package file in an empty directory:

{
  "name": "ossi",
  "version": "1.0.0",
  "description": "Empty project that runs auditjs.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "me@example.com",
  "license": "UNLICENSED",
  "devDependencies": {
    "auditjs": "^4.0.39"
  },
  "dependencies": {
    "aws-amplify": "^5.0.8",
    "aws-amplify-react": "^5.1.43"
  }
}

Then:

npm install
npx auditjs ossi

I get the following results:

 ________   ___  ___   ________   ___   _________       ___   ________
|\   __  \ |\  \|\  \ |\   ___ \ |\  \ |\___   ___\    |\  \ |\   ____\
\ \  \|\  \\ \  \\\  \\ \  \_|\ \\ \  \\|___ \  \_|    \ \  \\ \  \___|_
 \ \   __  \\ \  \\\  \\ \  \ \\ \\ \  \    \ \  \   __ \ \  \\ \_____  \
  \ \  \ \  \\ \  \\\  \\ \  \_\\ \\ \  \    \ \  \ |\  \\_\  \\|____|\  \
   \ \__\ \__\\ \_______\\ \_______\\ \__\    \ \__\\ \________\ ____\_\  \
    \|__|\|__| \|_______| \|_______| \|__|     \|__| \|________||\_________\
                                                                \|_________|


  _      _                       _   _
 /_)    /_`_  _  _ _/_   _  _   (/  /_`_._  _   _/ _
/_)/_/ ._//_// //_|/ /_//_//_' (_X /  ///_'/ //_/_\
   _/                _//

  AuditJS version: 4.0.39

✔ Starting application
✔ Getting coordinates for Sonatype OSS Index
✔ Auditing your application with Sonatype OSS Index
[2023-01-04T13:53:19.777] [ERROR] auditjs - There was an error auditing with Sonatype OSS Index Error: There was an error making the request: Error: Internal Server Error
    at /Users/dhedges/src/ossi/node_modules/auditjs/bin/Services/OssIndexRequestService.js:71:19
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 5)

Expected Behavior

I should be able to see results, whether passing or failing. I should not see a server error.

Desktop

  • OS: Mac OS X
  • NodeJS Version: 16.16
  • Version: 4.0.39

cc @bhamail / @DarthHater / @allenhsieh / @Slim-Shary

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions