Sitelet https://github.com/technomancy/slamhound/issues/91
Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

slamhound doesn't consider metadata/annotations #91

Description

@lvh

After running slamhound on lvh/caesium, it came up with the following suggestion:

   [[caesium.crypto.generichash]], [[caesium.crypto.sign]]  et cetera,
   namespaces."
   (:require [clojure.string :as s])
-  (:import [jnr.ffi LibraryLoader]
-           [jnr.ffi.annotations In Out Pinned LongLong]
-           [jnr.ffi.types size_t]))
+  (:import (jnr.ffi LibraryLoader)))

 (def ^:private bound-fns

The removed types are in fact used, e.g.:

    ^void randombytes
    [^bytes ^{Pinned {}} buf
     ^long ^{LongLong {}} buflen]

    ^long ^{size_t {}} crypto_secretbox_keybytes []
    ^long ^{size_t {}} crypto_secretbox_noncebytes []
    ^long ^{size_t {}} crypto_secretbox_macbytes []
    ^String ^{size_t {}} crypto_secretbox_primitive[]

Unfortunately in this case they are even quite significant and change the behavior of the program in an important way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions