Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Integration of components registry in the browser #792

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Integration of components editor in the browser

d6459d3
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

WIP: Integration of components registry in the browser #792

Integration of components editor in the browser
d6459d3
Select commit
Loading
Failed to load commit list.
GitHub Actions / spotbugs completed Jul 11, 2023 in 0s

SpotBugs Source Code Analyzer report

501 violation(s) found

Annotations

Check warning on line 25 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFCorePlugin.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

MS_EXPOSE_REP

Public static com.espressif.idf.core.IDFCorePlugin.getPlugin() may expose internal representation by returning IDFCorePlugin.plugin
Raw output
A public static method returns a reference to an array that is part of the static state of the class. Any code that calls this method can freely modify the underlying array. One fix is to return a copy of the array.

Check warning on line 35 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFCorePlugin.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION

Method lists Exception in its throws clause.
Raw output
Method lists Exception in its throws clause.
When declaring a method, the types of exceptions in the throws clause should be the most specific. Therefore, using Exception in the throws clause would force the caller to either use it in its own throws clause, or use it in a try-catch block (when it does not necessarily contain any meaningful information about the thrown exception).

For more information, see the SEI CERT ERR07-J rule [https://wiki.sei.cmu.edu/confluence/display/java/ERR07-J.+Do+not+throw+RuntimeException%2C+Exception%2C+or+Throwable].

Check warning on line 40 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFCorePlugin.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION

Method lists Exception in its throws clause.
Raw output
Method lists Exception in its throws clause.
When declaring a method, the types of exceptions in the throws clause should be the most specific. Therefore, using Exception in the throws clause would force the caller to either use it in its own throws clause, or use it in a try-catch block (when it does not necessarily contain any meaningful information about the thrown exception).

For more information, see the SEI CERT ERR07-J rule [https://wiki.sei.cmu.edu/confluence/display/java/ERR07-J.+Do+not+throw+RuntimeException%2C+Exception%2C+or+Throwable].

Check warning on line 33 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFEnvironmentVariables.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

MS_SHOULD_BE_FINAL

com.espressif.idf.core.IDFEnvironmentVariables.IDF_PATH isn't final but should be
Raw output
This static field public but not final, and could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

Check warning on line 35 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFEnvironmentVariables.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

MS_SHOULD_BE_FINAL

com.espressif.idf.core.IDFEnvironmentVariables.IDF_PYTHON_ENV_PATH isn't final but should be
Raw output
This static field public but not final, and could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

Check warning on line 39 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFEnvironmentVariables.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

MS_SHOULD_BE_FINAL

com.espressif.idf.core.IDFEnvironmentVariables.OPENOCD_SCRIPTS isn't final but should be
Raw output
This static field public but not final, and could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

Check warning on line 37 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFEnvironmentVariables.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

MS_SHOULD_BE_FINAL

com.espressif.idf.core.IDFEnvironmentVariables.PATH isn't final but should be
Raw output
This static field public but not final, and could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

Check warning on line 25 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFProjectNature.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP

com.espressif.idf.core.IDFProjectNature.getProject() may expose internal representation by returning IDFProjectNature.project
Raw output
Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

Check warning on line 31 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFProjectNature.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

com.espressif.idf.core.IDFProjectNature.setProject(IProject) may expose internal representation by storing an externally mutable object into IDFProjectNature.project
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 42 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFVersionsReader.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in com.espressif.idf.core.IDFVersionsReader.getVersions(): new java.io.InputStreamReader(InputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 49 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/InputStreamThread.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in com.espressif.idf.core.InputStreamThread.run(): new java.io.InputStreamReader(InputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 39 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/OutputStreamThread.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in com.espressif.idf.core.OutputStreamThread.run(): new java.io.OutputStreamWriter(OutputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 22 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/OutputStreamThread.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.OutputStreamThread(OutputStream, String, String) may expose internal representation by storing an externally mutable object into OutputStreamThread.out
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 113 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/ProcessBuilderFactory.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of errorGobbler, which is known to be non-null in com.espressif.idf.core.ProcessBuilderFactory.processData(InputStream, InputStream, OutputStream, Process)
Raw output
This method contains a redundant check of a known non-null value against the constant null.

Check warning on line 108 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/ProcessBuilderFactory.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

Redundant nullcheck of readerGobbler, which is known to be non-null in com.espressif.idf.core.ProcessBuilderFactory.processData(InputStream, InputStream, OutputStream, Process)
Raw output
This method contains a redundant check of a known non-null value against the constant null.

Check warning on line 91 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/ZipUtility.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE

com.espressif.idf.core.ZipUtility.decompress(ZipInputStream, File, int) may fail to clean up java.io.OutputStream on checked exception
Raw output
This method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.

In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.

This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. For sending feedback, check:

 * contributing guideline [https://github.com/spotbugs/spotbugs/blob/master/.github/CONTRIBUTING.md]
 * mailinglist [https://github.com/spotbugs/discuss/issues?q=]

In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.

See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes (PDF [https://people.eecs.berkeley.edu/~necula/Papers/rte_oopsla04.pdf]), for a description of the analysis technique.

Check warning on line 782 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in com.espressif.idf.core.build.IDFBuildConfiguration.linkBuildComponents(): new java.io.FileReader(File)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 297 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP

com.espressif.idf.core.build.IDFBuildConfiguration.getToolChainFile() may expose internal representation by returning IDFBuildConfiguration.toolChainFile
Raw output
Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

Check warning on line 159 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

new com.espressif.idf.core.build.IDFBuildConfiguration(IBuildConfiguration, String, IToolChain, ICMakeToolChainFile, String) may expose internal representation by storing an externally mutable object into IDFBuildConfiguration.toolChainFile
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 312 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

EI_EXPOSE_REP2

com.espressif.idf.core.build.IDFBuildConfiguration.build(int, Map, IConsole, IProgressMonitor) may expose internal representation by storing an externally mutable object into IDFBuildConfiguration.monitor
Raw output
This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

Check warning on line 333 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Exceptional return value of java.io.File.mkdir() ignored in com.espressif.idf.core.build.IDFBuildConfiguration.build(int, Map, IConsole, IProgressMonitor)
Raw output
This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

Check warning on line 192 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Exceptional return value of java.io.File.mkdirs() ignored in com.espressif.idf.core.build.IDFBuildConfiguration.getBuildContainerPath()
Raw output
This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

Check warning on line 820 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

Exceptional return value of java.io.File.mkdirs() ignored in com.espressif.idf.core.build.IDFBuildConfiguration.getIDFComponentsFolder()
Raw output
This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

Check warning on line 531 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in new com.espressif.idf.core.build.IDFBuildConfiguration$ReaderThread(InputStream, OutputStream): new java.io.InputStreamReader(InputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

Check warning on line 532 in bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

DM_DEFAULT_ENCODING

Found reliance on default encoding in new com.espressif.idf.core.build.IDFBuildConfiguration$ReaderThread(InputStream, OutputStream): new java.io.PrintStream(OutputStream)
Raw output
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.