Splunk Dev

Fix the javascript issue in this appserver build file (appserver/static/js/build/common.js) file?

Shukran
Explorer

Hi

I am trying to fix the vulnerable_javascript_library_usage error in Splunk Add-on Builder for appserver/static/js/build/common.js).

There are a couple of answered posts that mention the fix as:

  1. Export the app from any Add-on Builder
  2. Import the app into Add-on Builder v4.1.0 or newer
  3. Download the app packaged from Add-on Builder v4.1.0 or newer

The issue I am facing is that I have inherited the maintenance for the add-on and don’t have an app export from the original Add-on Builder.

I have tried a couple of things that include importing the spl and tgz files as a project in AOB but cannot import them as it shows an error while extracting the files.

I tried to create a new add-on with the same name and replace the files in that with the files from the downloaded tgz from Splunkbase. On exporting the created add-on and importing it again it shows an error when extracting that it's not a valid compressed file.

Also, I tried to just remove the common.js file which breaks the add-on when we run it on windows machines.

Is there any other way I can fix this? Or how can I import the add-on in AOB?

Thanking you in advance.

Labels (5)
0 Karma
1 Solution

Shukran
Explorer

I got it working. Posting the process here in-case someone else has the same issue.

  • Downloaded AOB 3.0.1
  • Create a new add-on with same name and id.
  • Copy existing files in $SPLUNK_HOME/etc/apps/<app_folder>
  • Update the views in Splunk UI
  • Export from AOB
  • Update AOB version
  • Import the project

 

View solution in original post

0 Karma

Shukran
Explorer

I got it working. Posting the process here in-case someone else has the same issue.

  • Downloaded AOB 3.0.1
  • Create a new add-on with same name and id.
  • Copy existing files in $SPLUNK_HOME/etc/apps/<app_folder>
  • Update the views in Splunk UI
  • Export from AOB
  • Update AOB version
  • Import the project

 

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...