Unable to Upload a Plugin into Fortify - fortify

When i am trying to upload the sample-parser plugin i am getting the error "Error loading/validating plugin metadata fro jar". Below is the Image of it.
Below lines are from the log file.
2019-03-05 02:25:19,719 | INFO | 95-6077bc1af140] | ExchangeProcessorRequest | 9 - com.fortify.plugin.camel - 1.3.1071 | Plugin com.fortify.plugin.runtime.manager received message com.fortify.plugin.messaging.manager.PluginInstallRequest#45feadce; session null
2019-03-05 02:25:19,723 | INFO | pool-20-thread-1 | PluginManagerImpl | 19 - com.fortify.plugin.runtime - 1.3.1071 | INSTALLING plugin from remote URL [file:/C:/Users/Administrator/Documents/Fortify_SSC_Server_18.10/apache-tomcat-8.5.28/temp/SSC-ssc/576e452a660d48659b21388ef203262b.jar]
2019-03-05 02:25:19,751 | INFO | pool-20-thread-1 | PluginManagerImpl | 19 - com.fortify.plugin.runtime - 1.3.1071 | Location for bundle to be installed: [ffinstall:/C:/Users/Administrator/Documents/Fortify_SSC_Server_18.10/apache-tomcat-8.5.28/temp/576e452a660d48659b21388ef203262b.jar_23660754815308672.jar]
2019-03-05 02:25:19,755 | WARN | pool-20-thread-1 | PluginManagerImpl | 19 - com.fortify.plugin.runtime - 1.3.1071 | Plugin installation FAILED.
2019-03-05 02:25:19,755 | ERROR | pool-20-thread-1 | PluginManagerMessageHandler | 9 - com.fortify.plugin.camel - 1.3.1071 | Failed to install plugin from URL=file:/C:/Users/Administrator/Documents/Fortify_SSC_Server_18.10/apache-tomcat-8.5.28/temp/SSC-ssc/576e452a660d48659b21388ef203262b.jar
com.fortify.plugin.runtime.metadata.PluginMetadataException: Error loading/validating plugin metadata from jar
at com.fortify.plugin.runtime.metadata.internal.PluginMetadataLoaderImpl.loadPluginJarMetadata(PluginMetadataLoaderImpl.java:46)
at com.fortify.plugin.runtime.transformer.AbstractPluginUrlHandler.doTransform(AbstractPluginUrlHandler.java:109)
at com.fortify.plugin.runtime.transformer.AbstractPluginUrlHandler.access$000(AbstractPluginUrlHandler.java:40)
at com.fortify.plugin.runtime.transformer.AbstractPluginUrlHandler$Connection.getInputStream(AbstractPluginUrlHandler.java:85)
at java.net.URL.openStream(URL.java:1045)[:1.8.0_181]
at com.fortify.plugin.runtime.manager.internal.PluginManagerImpl.installPluginJar(PluginManagerImpl.java:266)
at com.fortify.plugin.runtime.manager.internal.PluginManagerImpl.installRemotePluginJar(PluginManagerImpl.java:246)
at com.fortify.plugin.runtime.manager.internal.PluginManagerImpl.installPlugin(PluginManagerImpl.java:116)
at com.fortify.plugin.camel.manager.PluginManagerMessageHandler.handleInOutRequest(PluginManagerMessageHandler.java:49)[9:com.fortify.plugin.camel:1.3.1071]
at com.fortify.plugin.camel.manager.PluginManagerMessageHandler.handleInOutRequest(PluginManagerMessageHandler.java:39)[9:com.fortify.plugin.camel:1.3.1071]
at com.fortify.plugin.camel.helpers.ExchangeProcessorRequest.handle(ExchangeProcessorRequest.java:37)[9:com.fortify.plugin.camel:1.3.1071]
at com.fortify.plugin.camel.helpers.ExchangeProcessor$AsyncTask.run(ExchangeProcessor.java:123)[9:com.fortify.plugin.camel:1.3.1071]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_181]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_181]
I have copied the metadata information (.xml file ) in the same directory as the .JAR file.
Can someone tell me, if i am missing something here? Or i have to do it in a different way ??
Below is the link for sample parser.
https://github.com/fortify/sample-parser

It is solved.
I am using wrong .java files to convert as a .JAR files.
I got success when i have used the correct .java files along with .xml file.

Related

iOS Gitlab authentication failed for Fastlane command sync_code_signing

I'm trying to setup fastlane for an iOS project which has one Git repo for the project and the project contains multiple targets for "different" apps based on the same source code.
I created a second git repo for the signing certificates which should be synced with match, but i don't know where to set the auth stuff for it, because my lane throws the error below.
I start the lane signing which contains sync_code_signing
% fastlane signing --env ENVIRONMENTNAME
and i get the following output
[⠙] 🚀 Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
[✔] 🚀
[07:43:16]: Loading from './fastlane/.env.ENVIRONMENTNAME'
[07:43:16]: fastlane detected a Gemfile in the current directory
[07:43:16]: However, it seems like you didn't use `bundle exec`
[07:43:16]: To launch fastlane faster, please use
[07:43:16]:
[07:43:16]: $ bundle exec fastlane signing
[07:43:16]:
[07:43:16]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[07:43:18]: ------------------------------
[07:43:18]: --- Step: default_platform ---
[07:43:18]: ------------------------------
[07:43:18]: Driving the lane 'signing' 🚀
[07:43:18]: -------------------------------
[07:43:18]: --- Step: sync_code_signing ---
[07:43:18]: -------------------------------
[07:43:18]: Successfully loaded 'PROJECTDIR/fastlane/Matchfile' 📄
+--------------+----------------------------------------------------+
| Detected Values from './fastlane/Matchfile' |
+--------------+----------------------------------------------------+
| git_url | https://gitlab.com/TEAMID/apple-certificates.git |
| storage_mode | git |
+--------------+----------------------------------------------------+
+--------------------------------+----------------------------------------------------+
| Summary for match 2.198.1 |
+--------------------------------+----------------------------------------------------+
| type | development |
| readonly | false |
| generate_apple_certs | true |
| skip_provisioning_profiles | false |
| app_identifier | ["APPID"] |
| username | USERID |
| team_id | TEAMID |
| team_name | TEAMNAME |
| storage_mode | git |
| git_url | https://gitlab.com/TEAMID/apple-certificates.git |
| git_branch | master |
| shallow_clone | false |
| clone_branch_directly | false |
| keychain_name | login.keychain |
| force | false |
| force_for_new_devices | false |
| include_all_certificates | false |
| force_for_new_certificates | false |
| skip_confirmation | false |
| skip_docs | false |
| platform | ios |
| derive_catalyst_app_identifier | false |
| fail_on_name_taken | false |
| skip_certificate_matching | false |
| skip_set_partition_list | false |
| verbose | false |
+--------------------------------+----------------------------------------------------+
[07:43:18]: Cloning remote git repo...
[07:43:18]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
Cloning into '/var/folders/wf/_fzyy4y52hq4ssl02xmwwkx80000gn/T/d20211118-79026-m9y5x8'...
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.com/TEAMID/apple-certificates.git/' not found
[07:43:19]: Exit status: 128
[07:43:19]: Error cloning certificates repo, please make sure you have read access to the repository you want to use
[07:43:19]: Run the following command manually to make sure you're properly authenticated:
[07:43:19]: $ git clone https://gitlab.com/TEAMID/apple-certificates.git /var/folders/wf/_fzyy4y52hq4ssl02xmwwkx80000gn/T/d20211118-79026-m9y5x8
+------------------+---------+
| Lane Context |
+------------------+---------+
| ENVIRONMENT | ENVIRONMENTNAME |
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | |
| LANE_NAME | signing |
+------------------+---------+
[07:43:19]: Error cloning certificates git repo, please make sure you have access to the repository - see instructions above
+------+-------------------+-------------+
| fastlane summary |
+------+-------------------+-------------+
| Step | Action | Time (in s) |
+------+-------------------+-------------+
| 1 | default_platform | 0 |
| 💥 | sync_code_signing | 0 |
+------+-------------------+-------------+
[07:43:19]: fastlane finished with errors
[!] Error cloning certificates git repo, please make sure you have access to the repository - see instructions above
Do I have to install gitlab-runner locally for that?
I do not need to automate the process with gitlab-ci file right now, i'm fine calling the fastlane commands via console.
Do I have to install gitlab-runner locally for that? I - of course not.
You obviously don't have access to the git repository that the match uses.
Try cloning match repository directly, you may simply not be in VPN.

ROS services are not building properly

I am trying to build my custom ROS services. They are inside a another parent package
the structure is as follows:
|--catkine_ws
| |--src
| | |--Parent
| | | |--CMakeLists.txt
| | | |--package.xml
| | | |--ChildA
| | | | |--CMakeLists.txt
| | | | |--package.xml
| | | | |--srv
| | | | | |--SomeService.srv
| | | |--ChildB
The packages are building correctly and I am able to use them in other nodes and packags.
however when I try to use rossrv list the custom services do not appear. I think that this is causing some issues when I try to build my Simulink controller and it cannot find the service message definition.
Does any one have any idea what is going on?
I was able to fix the problem, while not obvious, the solution was rather simple. I had to change the slightly change the structure of the package by making the parent package a meta package then do some handling to make sure that the sub packages still had access to the cmakes to locate my external packages.

Could not resolve view with name '/hello/index' in servlet with name 'grailsDispatcherServlet'

I am not able to open the controller on grails project
I am using the following versions of groovy and grails
C:\Users\Two95Admin>grails -version
Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this releas| Grails Version: 3.1.10
| Groovy Version: 2.4.7
| JVM Version: 1.8.0_74
C:\Users\Two95Admin>
I have successfully created the helloworld project using following commands
grails create-app helloworld
cd helllworld
grails
create-controller hello
run-app
My project is executed on localhost:8080
Screenshot of an Error Screen
Error 500: Internal Server Error
URI
/hello/index
Class
javax.servlet.ServletException
Message
Could not resolve view with name '/hello/index' in servlet with name 'grailsDispatcherServlet'
Trace
Line | Method
->> 1229 | render in org.springframework.web.servlet.DispatcherServlet
| 1029 | processDispatchResult in ''
| 973 | doDispatch . . . . . in ''
| 895 | doService in ''
| 967 | processRequest . . . in org.springframework.web.servlet.FrameworkServlet
| 858 | doGet in ''
Please help me solving the problem
It looks like grails-app/views/hello/index.gsp does not exist. You will need to create that file.
Before accessing hello page you should generate views. "grails generate-views hello" try this way. I think adding jsp file is not the correct way.

guard cannot find libnotify nor cannot disable notifications but throw errors

guard was running fine, until out of the blue, it throws me these bunch of errors:
$bin/guard
Could not open library 'libgtkmm-2.4': libgtkmm-2.4: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-2.4.so': libgtkmm-2.4.so: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-2.4.so.1': libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-3.0': libgtkmm-3.0: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-3.0.so': libgtkmm-3.0.so: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-3.0.so.1': libgtkmm-3.0.so.1: cannot open shared object file: No such file or directory
13:15:58 - INFO - Guard is using Libnotify to send notifications.
13:15:58 - INFO - Guard is using TerminalTitle to send notifications.
13:15:59 - INFO - Bundle already up-to-date
13:15:59 - INFO - Guard::Rack will now restart your app on port 9292 using development environment.
13:15:59 - INFO - Restarting Rack...
libnotify.so not found!
13:15:59 - ERROR - Guard::Rack failed to achieve its <start>, exception was:
> [#4FE305F3B849] NoMethodError: undefined method `notify_init' for #<Libnotify::API:0x97a2d18>
Here is a guard notifiers command (shortened):
+-------------------+-----------+------+-----------+-------------------+
| libnotify | ✔ | ✘ | transient | false |
| | | | append | true |
| | | | timeout | 3 |
+-------------------+-----------+------+-----------+-------------------+
| notifysend | ✘ | ✘ | t | 3000 |
| | | | h | "int:transient:1" |
+-------------------+-----------+------+-----------+-------------------+
| terminal_title | ✔ | ✘ | | |
+-------------------+-----------+------+-----------+-------------------+
| file | ✘ | ✘ | format | "%s\n%s\n%s\n" |
+-------------------+-----------+------+-----------+-------------------+
I've tried setting notifiers :off option in the Guardfile, uninstalling libnotify gem, but it had no effect.
I am running ubuntu server so I think I shouldn't have libnotify, why is guard so rude to me all of a sudden?
[EDIT2]
You mentioned you set notifiers :off, not notification :off (I get mixed with the options all the time, myself).
Also, guard 'detects' libnotify by requiring it here - which means you have the file somewhere on your system.
(If there's no file, requiring fails with a LoadError and Guard decides libnotify is unavailable).
One "brute force" way to find out where it is by running strace (should be available on server):
strace -f -e open bundle exec guard notifiers 2>&1 | /bin/grep -v 'ENOENT' |/bin/grep lib/libnotify.rb
which for me shows:
[pid 16703] open("/home/me/.rvm/gems/ruby-2.1.4#guard/gems/libnotify-0.9.0/lib/libnotify.rb", O_RDONLY|O_CLOEXEC) = 7
[pid 16703] open("/home/me/.rvm/gems/ruby-2.1.4#guard/gems/libnotify-0.9.0/lib/libnotify.rb", O_RDONLY|O_CLOEXEC) = 7
NOTE: you may have system rubies installed, which you can check with:
rvm use system
gem list libnotify
Guard is complaining simply because the gem is installed somewhere (or there's a vendored gem somewhere.

" Error Compilation error: encoded string too long:" when making a build

I have a Grails project that is running correctly in dev mode but when I try to create a war file it gives me following message and stops the build
| Compiling 1 source files
| Compiling 1 source files.
| Compiling 1 source files..
| Compiling 1 source files...
| Compiling 1 source files....
| Compiling 1 source files.....
| Compiling 16 GSP files for package [ProjectName]
| Compiling 16 GSP files for package [ProjectName].
| Error Compilation error: encoded string too long: 108421 bytes
Grails doesn't give me any other info in terms of which GSP or line has the problem, anyone seen this happening?
Here are the grails stats, I would say its a fairly small project
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 6 | 624 |
| Domain Classes | 6 | 109 |
| Java Helpers | 1 | 96 |
| Unit Tests | 12 | 565 |
| Scripts | 1 | 4 |
+----------------------+-------+-------+
| Totals | 26 | 1398 |
+----------------------+-------+-------+
It seems this is grails bug with versions prior to 2.3.7 but it's fixed in 2.3.7 and above.
You have two options upgrade or follow the below steps
Find all the gsp pages with file size greater than 64K.
Add <% /* comment to break the static gsp block */ %> to the middle of your static pages (add it to the end of html tags, for example after </P> etc).
This will make grails think that it's processing two chunks and allows it to get processed.
I've seen this before. Exactly what #tim_yates commented! Refactored some gsp's [include for example] and all was good again. Also, making a little research about this I found some interesting things about DataOutputStream.java. It seems to have a 64kb limit for String objects.
Maybe this can also help you.
Cheers!
I never knew what the problem was, all I did is moved all the needed file to a brand new project and this error disappeared!

Resources