• arichards (Veracode)

    Java's CallableStatement is generally safe, if used correctly. The entire query needs to be parameterized, however. If you were to dynamically build a SQL string within the stored procedure, with concatenated parameter values, it contains the same risks inherent with dynamically concatenated parameter values in regular SQL queries.

     

    In summary, ensure that the CallableStatment's query is entirely parameterized, and that the stored procedure is safely constructed. If you have any other questions, I would recommend you schedule a consultation call to discuss. You can check out this knowledge article (https://community.veracode.com/s/article/How-to-schedule-a-consultation-call) on how to schedule a consultation call with us.

    Expand Post
    • SSahoo361541 (Community Member)

      Thank you Austin for your reply. I got the same answer while googling. In veracode scan report for our application code, it is reporting as flaw. Please let me know how can I stop in reporting as flaw.

      • arichards (Veracode)

        If the static analysis is identifying the flaw it is likely because the scanner sees a portion of the SQL query that specifies the stored procedure as being dynamically concatenated and not parameterized. If a portion of the SQL query can't be paramterized because it is not a paramterizable element, then it is recommended that you validate the input with a strict whitelist and accept known-good values only. Without the scan details it isn't possible to advise why the scanner detected the finding so I would recommend a consultation to discuss further. You can check out this knowledge article (https://community.veracode.com/s/article/How-to-schedule-a-consultation-call) on how to schedule a consultation call with us.

        Expand Post

Topics (3)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.