# SecuryString Variable Usage - Analyze file

**URL:** <https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130>\
**Category:** Studio\
**Tags:** orchestrator, database, activities\
**Created:** [April 8, 2025, 12:12pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130 "2025-04-08T12:12:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erick\_Richeter](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/erick_richeter/32/512633_2.png) [@Erick\_Richeter](https://forum.uipath.com/u/Erick_Richeter)\
**Post date:** [April 8, 2025, 12:12pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/1 "2025-04-08T12:12:15Z")

</div>

Hello All!

I’m using the “Analyze File” function, but I’m encountering the following error:  
 ![The image shows a code analysis tool highlighting three security warnings related to SecureString variable usage outside of the creation scope in different database credential contexts (Prod, Dev, and one unspecified). (Legendado por IA)](https://global.discourse-cdn.com/uipath/original/4X/d/b/1/db1f6ced68b38e5378db2670a6beff9e832f783d.png)

How can I handle this error? I’m obtaining the credentials from the orchestrator and using them to log onto the SQL Server.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/9/d/4/9d4ee3c364ae2073e111c17e33eec193449f07a7.png)

---

<div class="post-metadata">

**Author:** ![yedukondaluaregala](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yedukondaluaregala/32/557780_2.png) [@yedukondaluaregala](https://forum.uipath.com/u/yedukondaluaregala)\
**Post date:** [April 8, 2025, 12:19pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/2 "2025-04-08T12:19:36Z")

</div>

@Erick_Richeter

This is not a blocker for your execution, if it is blocking to execute or publish you can modify it

to modify follow below steps,

1.open Workflow Analyzer settings  
2. Search with ST-SEC-008  
3. you can get the results there you can see the Default type as error change to warn or any other option.  
4. click on Ok and proceed with your automation.

 ![The image shows the interface of UiPath Studio with various options and tools for automating workflows, including Analyze File, Export to Excel, and Publish. (Captioned by AI)](https://global.discourse-cdn.com/uipath/original/4X/e/7/f/e7fbfaf9f54a1d5be8a029ca6b46961c975eb4f3.png)

 ![A screenshot of UiPath Project Settings highlighting the Workflow Analyzer configuration for the secure string variable usage. (Captioned by AI)](https://global.discourse-cdn.com/uipath/original/4X/7/2/d/72d0877fe6e3b920f6973f7f461a754627801f46.png)

Happy Automation!!

---

<div class="post-metadata">

**Author:** ![ashokkarale](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashokkarale/32/474400_2.png) [@ashokkarale](https://forum.uipath.com/u/ashokkarale)\
**Post date:** [April 8, 2025, 12:21pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/3 "2025-04-08T12:21:53Z")

</div>

@Erick_Richeter,

Keep your credential variable and use them closely. Like this. Variable scope should be inside that single sequence.

 ![The image depicts a workflow sequence in UiPath with a "Get Credential" activity followed by a comment indicating where to use the credential. (Captioned by AI)](https://global.discourse-cdn.com/uipath/original/4X/0/e/e/0eec1011698f536bfeae0dff7b60ca271cb8759b.png)

---

<div class="post-metadata">

**Author:** ![singh\_sumit](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@singh\_sumit](https://forum.uipath.com/u/singh_sumit)\
**Post date:** [April 8, 2025, 12:37pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/4 "2025-04-08T12:37:49Z")

</div>

Hey @Erick_Richeter ok so you creating the securestring variable to log into some portal or any application you are accessing. these error rectifying that the Variable you created in for example sequence1 and now you are using it to sequence2. so use that variable inside that sequence.

cheers

---

<div class="post-metadata">

**Author:** ![sonaliaggarwal47](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sonaliaggarwal47/32/234327_2.png) [@sonaliaggarwal47](https://forum.uipath.com/u/sonaliaggarwal47)\
**Post date:** [April 8, 2025, 12:46pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/5 "2025-04-08T12:46:45Z")

</div>

Hi @Erick_Richeter,

This error happens when you are fetching secure creds outside of the immediate scope.

Per secure string related workflow analyzer rules,

1. secure string variable should be defined and used within immediate scope
2. should never be used as argument
3. should never be converted to plain string

Hope this helps.

Regards  
Sonali

---

<div class="post-metadata">

**Author:** ![Erick\_Richeter](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/erick_richeter/32/512633_2.png) [@Erick\_Richeter](https://forum.uipath.com/u/Erick_Richeter)\
**Post date:** [April 8, 2025, 12:53pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/6 "2025-04-08T12:53:02Z")

</div>

Thank you, @singh_sumit and @ashokkarale. I adjusted the scope of my application to keep my secure string within the same scope. I also appreciate the explanation, @sonaliaggarwal47 !

---

<div class="post-metadata">

**Author:** ![Jon\_Smith](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jon_smith/32/523286_2.png) [@Jon\_Smith](https://forum.uipath.com/u/Jon_Smith)\
**Post date:** [April 8, 2025, 12:53pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/7 "2025-04-08T12:53:31Z")

</div>

Its a rule that the REFramework violates (at least in the one that is modified to load credentials to the Config Dictionary), but it doesnt proc the rule because the securestring is in a Dictionary\<string, SecureString\> and it doesnt realize the SecureString in the Dictionary.

It in my opinion should only be a warning as its not so serious if you pass from one workflow to another as thats no different than passing it from the workflow to the activity that uses it.

That being said, it is a good idea to keep the scope small, however I’ve suggest not only doing that with Credential type assets but all assets, ditch the config and just grab an asset the moment you need it.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [April 11, 2025, 12:53pm UTC](https://forum.uipath.com/t/securystring-variable-usage-analyze-file/2781130/8 "2025-04-11T12:53:58Z")

</div>

Closed on April 11, 2025, 12:53pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
